[Zope] Re: Security class attribute
Peter Bengtsson
peter at fry-it.com
Fri Jan 27 12:16:55 EST 2006
On 1/27/06, Florent Guillaume <fg at nuxeo.com> wrote:
>
>
> Peter Bengtsson wrote:
> > On 1/26/06, Brian Lloyd <brian-aSqDGKcZc1w at public.gmane.org> wrote:
> >> The ClassSecurityInfo is a convenience to provide a
> >> halfway-sane spelling for a lot of ugliness under the
> >> hood in setting up security.
> >>
> >> IntializeClass (among other things) tells the CSI to
> >> apply itself to the class to set everything up, then it
> >> gets *removed* from the class.
> >>
> >> I can't tell for sure from your code, but I suspect that
> >> IntializeClass is being called on MyProduct *before* you
> >> are doing your class augmentation -- if you can defer the
> >> call until after you hack it, it should work.
> >>
> >
> > No, I did the InitializeClass() *after* everything else.
> > So still no explaination. For what's going on.
>
> That's because for all classes deriving from ExtensionClass there's a
> magical call (indirectly) to InitializeClass as soon as they are defined.
> That's one of the numerous things Jim pioneered with ExtensionClasses, at a
> time where metaclasses didn't exist.
>
Interesting.
Thanks for you help. I'll have to blog about this now to remember it.
> Florent
>
>
>
> --
> Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
> +33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
>
>
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
More information about the Zope
mailing list