예제 #1
0
 def allowedRolesAndUsers(self):
     """
     Return a list of roles and users with View permission.
     Used by PortalCatalog to filter out items you're not allowed to see.
     """
     ob = self.__ob
     allowed = {}
     for r in rolesForPermissionOn('View', ob):
         allowed[r] = 1
     localroles = mergedLocalRoles(ob)
     for user, roles in localroles.items():
         for role in roles:
             if allowed.has_key(role):
                 allowed['user:'******'Owner'):
         del allowed['Owner']
     return list(allowed.keys())
예제 #2
0
파일: CatalogTool.py 프로젝트: goschtl/zope
 def allowedRolesAndUsers(self):
     """
     Return a list of roles and users with View permission.
     Used by PortalCatalog to filter out items you're not allowed to see.
     """
     ob = self.__ob
     allowed = {}
     for r in rolesForPermissionOn('View', ob):
         allowed[r] = 1
     localroles = mergedLocalRoles(ob)
     for user, roles in localroles.items():
         for role in roles:
             if allowed.has_key(role):
                 allowed['user:'******'Owner'):
         del allowed['Owner']
     return list(allowed.keys())