I have some trouble with the zope security. I got ForbiddenAttribute 
Exception on sub-classes.

In example:
 >>>(Pdb) _b = BaseCls()
 >>>(Pdb) class SubCls( BaseCls ): pass
 >>>(Pdb) _s = SubCls()
so I got ForbiddenAttribute Exceptions for sub-classes:
 >>>(Pdb) canAccess( _b, 'items' )
 >>>(Pdb) canAccess( _s, 'items' )
 >>>*** ForbiddenAttribute: ('items',     ...
damned, have a look at the checker:
 >>>(Pdb) _checker = getChecker( ProxyFactory( _b ) )
 >>>(Pdb) len( _checker.get_permissions )
 >>>(Pdb) _checker = getChecker( ProxyFactory( _s ) )
 >>>(Pdb) len( _checker.get_permissions )
why i lost my permissions?
but checkPermission returns true:
 >>>(Pdb) checkPermission( 'Test.read', ProxyFactory(_b) )
 >>>(Pdb) checkPermission( 'Test.read', ProxyFactory(_s) )


What should I do to avoid ForbiddenAttribute Exceptions in this scenario?

Zope3-users mailing list

Reply via email to