示例#1
0
 def _global_rights(self):
     rights = AccessRights(inherit=False)
     if self._admin_role:
         rights.append(
             RoleAccess(
                 self._admin_role.name,
                 [AccessRight.VIEW, AccessRight.CHANGE, AccessRight.DELETE
                  ]))
     return rights
示例#2
0
def _parent_section(admin_role):
    rights = AccessRights(inherit=False)
    rights.append(
        RoleAccess(admin_role,
                   [AccessRight.VIEW, AccessRight.CHANGE, AccessRight.DELETE]))
    return Section(accessRights=rights, name=NAMES['parentSection'])