[Checkins] SVN: PluggableAuthService/trunk/ - Added a method to the IRoleAssignerPlugin to remove roles from a

Jens Vagelpohl jens at dataflake.org
Mon Jun 11 15:09:59 EDT 2007


Log message for revision 76618:
  - Added a method to the IRoleAssignerPlugin to remove roles from a
    principal, and an implementation for it on the ZODBRoleManager.
    (http://www.zope.org/Collectors/PAS/57)
  

Changed:
  U   PluggableAuthService/trunk/doc/CHANGES.txt
  U   PluggableAuthService/trunk/interfaces/plugins.py
  U   PluggableAuthService/trunk/plugins/ZODBRoleManager.py

-=-
Modified: PluggableAuthService/trunk/doc/CHANGES.txt
===================================================================
--- PluggableAuthService/trunk/doc/CHANGES.txt	2007-06-11 19:07:28 UTC (rev 76617)
+++ PluggableAuthService/trunk/doc/CHANGES.txt	2007-06-11 19:09:58 UTC (rev 76618)
@@ -4,6 +4,10 @@
 
     Features Added
 
+      - Added a method to the IRoleAssignerPlugin to remove roles from a
+        principal, and an implementation for it on the ZODBRoleManager.
+        (http://www.zope.org/Collectors/PAS/57)
+
       - Added events infrastructure. Enabled new IPrincipalCreatedEvent and
         ICredentialsUpdatedEvent events.
 

Modified: PluggableAuthService/trunk/interfaces/plugins.py
===================================================================
--- PluggableAuthService/trunk/interfaces/plugins.py	2007-06-11 19:07:28 UTC (rev 76617)
+++ PluggableAuthService/trunk/interfaces/plugins.py	2007-06-11 19:09:58 UTC (rev 76618)
@@ -179,6 +179,13 @@
         o Return a Boolean indicating whether the role was assigned or not
         """
 
+    def doRemoveRoleFromPrincipal( principal_id, role ):
+
+        """ Remove a principal/role association from a Role Manager
+
+        o Return a Boolean indicating whether the role was removed or not
+        """
+
 class IUserFactoryPlugin( Interface ):
 
     """ Create a new IPropertiedUser.

Modified: PluggableAuthService/trunk/plugins/ZODBRoleManager.py
===================================================================
--- PluggableAuthService/trunk/plugins/ZODBRoleManager.py	2007-06-11 19:07:28 UTC (rev 76617)
+++ PluggableAuthService/trunk/plugins/ZODBRoleManager.py	2007-06-11 19:09:58 UTC (rev 76618)
@@ -159,6 +159,10 @@
     def doAssignRoleToPrincipal( self, principal_id, role ):
         return self.assignRoleToPrincipal( role, principal_id )
 
+    security.declarePrivate( 'doRemoveRoleFromPrincipal' )
+    def doRemoveRoleFromPrincipal( self, principal_id, role ):
+        return self.removeRoleFromPrincipal( role, principal_id )
+
     #
     #   Role management API
     #



More information about the Checkins mailing list