[Zope] Acquisition problem - please help
dale w lance
dale.w.lance@MAIL.SPRINT.COM
Fri, 17 Dec 1999 13:24:51 -0600
--openmail-part-1788830f-00000001
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="BDY.TXT"
ok, now I have questions.
1. If methodX writes new values to these properties, which object gets
modified?
2. Since everything is off of [one] can't I get everything through
proper
structuring of the url?
3. Isn't security (permissions) acquired?
(see previous post about structuring large projects)
4. Can I circumvent security by structuring my url to acquire
methodX from another object?
Dale Lance
> -----Original Message-----
> From: evan [mailto:evan@4-am.com]
> Sent: Friday, December 17, 1999 12:29 PM
> To: dparker
> Cc: evan; jkhoffman; pavlos; zope
> Subject: Re: [Zope] Acquisition problem - please help
>
>
> Dave Parker wrote:
>
> > /one
> > -methodX
> > /two
> > -propertyA(1)
> > /three
> > /four
> > /five
> > -propertyA(2)
> >
> > http://host/one/two/three/four - methodX sees propertyA(1)
> > http://host/one/five/three/four - methodX sees propertyA(2)
> >
> > So the thing that doesn't jibe is that it can't *just* be
> the physical
> > path - were that the case what I'm doing here would not work at all,
> > right?
>
> It isn't *just* the physical path, but that does have an
> effect. As long as
> you proceed from container to contained, acquisition simply
> looks back up the
> path. The moment you acquire something from above the
> current container, you
> effectively bring in the context of the acquired object.
> Let's break it down
> using 'of' for acquisition parents, and brackets to indicate
> that a name
> includes its context:
>
> /one -> [one] -> one
> /one/two -> [two] -> two of [one]
> ... and now it gets a little tricky ...
> /one/two/three -> [three] of [two] -> (three of [one]) of [two]
> /one/two/three/four -> [four] of [two]*
> * Not quite accurate, it's really four of ([three] of [two]),
> but don't worry
> about it
>
> Since methodX is a method, it doesn't add any context, so
> PropertyA is searched
> for in [four] of [two], and found in [two].
>
> /one/five -> [five]
> /one/five/three -> [three] of [five]
> /one/five/three/four -> [four] of [five]
>
> and PropertyA is found in [five].
>
> Now, if 'three' had a 'PropertyA', both of the above would
> have found that
> first in [four] (/one/three/four), so to get the same results
> you would have to
> rearrange your URLs into '/one/three/four/two' -> [two] of [four] and
> '/one/three/four/five' -> [five] of [four].
>
> Not to mention, if you replace methodX with DocumentX and try
> to put a default
> 'PropertyA' in 'one' then no force in the world can save you, since:
>
> /.../DocumentX -> [DocumentX] of (...) -> (DocumentX of one) of (...)
>
> ...and you'll always search 'one' before any other folder.
>
> If you really want a default, you need to put it a folder
> (such as 'three')
> which is *not* in [two] or [five], but *is* in [three], and
> ensure that 'three'
> appears earlier in your URLs than 'two' or 'five'.
>
> Clear? <wink>
>
> Cheers,
>
> Evan @ 4-am
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
--openmail-part-1788830f-00000001--