예제 #1
0
    def manage_defined_roles(self, submit=None, REQUEST=None):
        """Called by management screen."""
        if submit == 'Add Role':
            role = reqattr(REQUEST, 'role').strip()
            return self._addRole(role, REQUEST)

        if submit == 'Delete Role':
            roles = reqattr(REQUEST, 'roles')
            return self._delRoles(roles, REQUEST)

        return self.manage_access(REQUEST)
예제 #2
0
파일: role.py 프로젝트: zopefoundation/Zope
    def manage_defined_roles(self, submit=None, REQUEST=None):
        """Called by management screen."""
        if submit == 'Add Role':
            role = reqattr(REQUEST, 'role').strip()
            return self._addRole(role, REQUEST)

        if submit == 'Delete Role':
            roles = reqattr(REQUEST, 'roles')
            return self._delRoles(roles, REQUEST)

        return self.manage_access(REQUEST)