[Zope3-dev] interface in zcml declarations

Steve Alexander steve@cat-box.net
Fri, 01 Mar 2002 12:05:59 +0000


Here's part of the security.zcml file:


<security:protectClass
    name="Zope.App.Security.RolePermissionView.PermissionRoles."
    permission_id="Zope.Security"
    methods="roles, rolesInfo"
    interface="Zope.App.Security.IRegisteredObject." />

IPermission specialises IRegisteredObject.

However, if I put IPermission in place of IRegisteredObject in the zcml, 
the methods of PermissionRoles in IRegisteredObject are no longer 
protected by a permission.

PermissionRoles implements IPermission, so I think that this should work.

It looks like the protectClass machinery isn't taking inherited methods 
of interfaces into account.

--
Steve Alexander