[Zope-dev] ZPatterns; possible bug?
Phillip J. Eby
pje@telecommunity.com
Thu, 04 Jan 2001 15:50:56 -0500
At 06:03 PM 1/4/01 +0000, Steve Alexander wrote:
>
>I think what is happening in the broken example is that when the zope
>security machinery asks for __roles__, name is also computed. The
>machinery must request __roles__ before changing anything.
>
The behavior is as documented, though I'm not sure I'd call it "intended",
exactly. :) You can fix this with either a seperate statement, as you've
noticed, OR by placing the __roles__ computation *first* in the WITH SELF
statement. This will ensure that it is already computed before the other
items execute.