Dieter Maurer wrote
 > ... protecting simple type attributes by roles ...

 >  > Patch attached.

I have a small optimization:

            if (
                # start with inexpensive checks
                roles is not _noroles
                or name is None
                or value is None
                or container is None
                # now the expensive ones
                or hasattr(value,'__roles__')
                or not hasattr(aq_base(container), name + '__roles__')
                ):


If we replace "hasattr(value,'__roles__')" above by
"hasattr(aq_base(value),'__roles__')", then the (discarded) roles computation
becomes a bit cheaper.

-- 
Dieter

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to