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
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'])