[Zope] Re: Security class attribute
Florent Guillaume
fg at nuxeo.com
Fri Jan 27 11:11:34 EST 2006
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.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope
mailing list