Exemplo n.º 1
0
 def manage_acquiredPermissions(self, permissions=[], REQUEST=None):
     """Change the permissions that acquire.
     """
     BaseRoleManager.manage_acquiredPermissions(self,
                                                permissions=permissions)
     if REQUEST is not None:
         return self.manage_access(REQUEST)
Exemplo n.º 2
0
Arquivo: role.py Projeto: wwiras/Zope
 def manage_role(self, role_to_manage, permissions=[], REQUEST=None):
     """Change the permissions given to the given role.
     """
     BaseRoleManager.manage_role(
         self, role_to_manage, permissions=permissions)
     if REQUEST is not None:
         return self.manage_access(REQUEST)
Exemplo n.º 3
0
 def manage_acquiredPermissions(self, permissions=[], REQUEST=None):
     """Change the permissions that acquire.
     """
     BaseRoleManager.manage_acquiredPermissions(
         self, permissions=permissions)
     if REQUEST is not None:
         return self.manage_access(REQUEST)
Exemplo n.º 4
0
 def manage_role(self, role_to_manage, permissions=[], REQUEST=None):
     """Change the permissions given to the given role.
     """
     BaseRoleManager.manage_role(
         self, role_to_manage, permissions=permissions)
     if REQUEST is not None:
         return self.manage_access(REQUEST)
Exemplo n.º 5
0
 def manage_setLocalRoles(self, userid, roles=[], REQUEST=None):
     """Set local roles for a user."""
     if roles:
         BaseRoleManager.manage_setLocalRoles(self, userid, roles)
     else:
         return self.manage_delLocalRoles((userid, ), REQUEST)
     if REQUEST is not None:
         stat = 'Your changes have been saved.'
         return self.manage_listLocalRoles(self, REQUEST, stat=stat)
Exemplo n.º 6
0
 def manage_setLocalRoles(self, userid, roles=[], REQUEST=None):
     """Set local roles for a user."""
     if roles:
         BaseRoleManager.manage_setLocalRoles(self, userid, roles)
     else:
         return self.manage_delLocalRoles((userid,), REQUEST)
     if REQUEST is not None:
         stat = 'Your changes have been saved.'
         return self.manage_listLocalRoles(self, REQUEST, stat=stat)
Exemplo n.º 7
0
Arquivo: role.py Projeto: wwiras/Zope
    def manage_permission(self, permission_to_manage,
                          roles=[], acquire=0, REQUEST=None):
        """Change the settings for the given permission.

        If optional arg acquire is true, then the roles for the permission
        are acquired, in addition to the ones specified, otherwise the
        permissions are restricted to only the designated roles.
        """
        BaseRoleManager.manage_permission(
            self, permission_to_manage, roles=roles, acquire=acquire)
        if REQUEST is not None:
            return self.manage_access(REQUEST)
Exemplo n.º 8
0
    def manage_permission(self, permission_to_manage,
                          roles=[], acquire=0, REQUEST=None):
        """Change the settings for the given permission.

        If optional arg acquire is true, then the roles for the permission
        are acquired, in addition to the ones specified, otherwise the
        permissions are restricted to only the designated roles.
        """
        BaseRoleManager.manage_permission(
            self, permission_to_manage, roles=roles, acquire=acquire)
        if REQUEST is not None:
            return self.manage_access(REQUEST)
Exemplo n.º 9
0
 def manage_delLocalRoles(self, userids, REQUEST=None):
     """Remove all local roles for a user."""
     BaseRoleManager.manage_delLocalRoles(self, userids)
     if REQUEST is not None:
         stat = 'Your changes have been saved.'
         return self.manage_listLocalRoles(self, REQUEST, stat=stat)
Exemplo n.º 10
0
 def manage_delLocalRoles(self, userids, REQUEST=None):
     """Remove all local roles for a user."""
     BaseRoleManager.manage_delLocalRoles(self, userids)
     if REQUEST is not None:
         stat='Your changes have been saved.'
         return self.manage_listLocalRoles(self, REQUEST, stat=stat)