[Erp5-report] r8823 - /erp5/trunk/products/ERP5Security/

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jul 27 08:27:13 CEST 2006


Author: jerome
Date: Thu Jul 27 08:27:11 2006
New Revision: 8823

URL: http://svn.erp5.org?rev=8823&view=rev
Log:
Fix lines too long 


Modified:
    erp5/trunk/products/ERP5Security/ERP5GroupManager.py
    erp5/trunk/products/ERP5Security/ERP5RoleManager.py
    erp5/trunk/products/ERP5Security/ERP5UserManager.py

Modified: erp5/trunk/products/ERP5Security/ERP5GroupManager.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Security/ERP5GroupManager.py?rev=8823&r1=8822&r2=8823&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/ERP5GroupManager.py (original)
+++ erp5/trunk/products/ERP5Security/ERP5GroupManager.py Thu Jul 27 08:27:11 2006
@@ -36,7 +36,8 @@
 class ConsistencyError(Exception): pass
 
 manage_addERP5GroupManagerForm = PageTemplateFile(
-    'www/ERP5Security_addERP5GroupManager', globals(), __name__='manage_addERP5GroupManagerForm' )
+    'www/ERP5Security_addERP5GroupManager', globals(),
+    __name__='manage_addERP5GroupManagerForm' )
 
 def addERP5GroupManager( dispatcher, id, title=None, REQUEST=None ):
   """ Add a ERP5GroupManager to a Pluggable Auth Service. """
@@ -129,7 +130,8 @@
           security_definition_list:
         base_category_list = tuple(base_category_list)
         method = getattr(self, method_name)
-        security_category_list = security_category_dict.setdefault(base_category_list, [])
+        security_category_list = security_category_dict.setdefault(
+                                          base_category_list, [])
         try:
           security_category_list.extend(
             method(base_category_list, user_name, person_object, '')
@@ -142,7 +144,8 @@
               error = sys.exc_info())
 
       # Get group names from category values
-      group_id_list_generator = getattr(self, 'ERP5Type_asSecurityGroupIdList', None)
+      group_id_list_generator = getattr(self,
+                                    'ERP5Type_asSecurityGroupIdList', None)
       if group_id_list_generator is not None:
         for base_category_list, category_value_list in \
             security_category_dict.items():
@@ -156,7 +159,8 @@
               raise
             except:
               LOG('ERP5GroupManager', WARNING,
-                  'could not get security groups from ERP5Type_asSecurityGroupIdList',
+                  'could not get security groups from '
+                  'ERP5Type_asSecurityGroupIdList',
                   error = sys.exc_info())
       else:
         group_id_generator = getattr(self, 'ERP5Type_asSecurityGroupId')
@@ -165,20 +169,25 @@
           for category_dict in category_value_list:
             try:
               security_group_list.append(
-                group_id_generator(category_order=base_category_list, **category_dict)
+                group_id_generator(category_order=base_category_list,
+                                    **category_dict)
               )
             except ConflictError:
               raise
             except:
               LOG('ERP5GroupManager', WARNING,
-                  'could not get security groups from ERP5Type_asSecurityGroupId',
+                  'could not get security groups from '
+                  'ERP5Type_asSecurityGroupId',
                   error = sys.exc_info())
 
       setSecurityManager(sm)
       return tuple(security_group_list)
 
-    _getGroupsForPrincipal = CachingMethod(_getGroupsForPrincipal, id='ERP5GroupManager_getGroupsForPrincipal')
-    return _getGroupsForPrincipal(user_name=principal.getId(), path=self.getPhysicalPath())
+    _getGroupsForPrincipal = CachingMethod(_getGroupsForPrincipal,
+                                  id='ERP5GroupManager_getGroupsForPrincipal')
+    return _getGroupsForPrincipal(
+                user_name=principal.getId(),
+                path=self.getPhysicalPath())
 
 
 

Modified: erp5/trunk/products/ERP5Security/ERP5RoleManager.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Security/ERP5RoleManager.py?rev=8823&r1=8822&r2=8823&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/ERP5RoleManager.py (original)
+++ erp5/trunk/products/ERP5Security/ERP5RoleManager.py Thu Jul 27 08:27:11 2006
@@ -20,12 +20,14 @@
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 from Products.PluggableAuthService.plugins.BasePlugin import BasePlugin
 from Products.PluggableAuthService.utils import classImplements
-from Products.PluggableAuthService.interfaces.plugins import IRolesPlugin, IRoleEnumerationPlugin
+from Products.PluggableAuthService.interfaces.plugins import IRolesPlugin,\
+                                                    IRoleEnumerationPlugin
 
 from ERP5UserManager import SUPER_USER
 
 manage_addERP5RoleManagerForm = PageTemplateFile(
-    'www/ERP5Security_addERP5RoleManager', globals(), __name__='manage_addERP5RoleManagerForm' )
+    'www/ERP5Security_addERP5RoleManager', globals(),
+    __name__='manage_addERP5RoleManagerForm' )
 
 def addERP5RoleManager( dispatcher, id, title=None, REQUEST=None ):
     """ Add a ERP5RoleManager to a Pluggable Auth Service. """

Modified: erp5/trunk/products/ERP5Security/ERP5UserManager.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Security/ERP5UserManager.py?rev=8823&r1=8822&r2=8823&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/ERP5UserManager.py (original)
+++ erp5/trunk/products/ERP5Security/ERP5UserManager.py Thu Jul 27 08:27:11 2006
@@ -37,7 +37,8 @@
 SUPER_USER = '__erp5security-=__'
 
 manage_addERP5UserManagerForm = PageTemplateFile(
-    'www/ERP5Security_addERP5UserManager', globals(), __name__='manage_addERP5UserManagerForm' )
+    'www/ERP5Security_addERP5UserManager', globals(),
+    __name__='manage_addERP5UserManagerForm' )
 
 def addERP5UserManager(dispatcher, id, title=None, REQUEST=None):
     """ Add a ERP5UserManagern to a Pluggable Auth Service. """
@@ -102,14 +103,19 @@
 
             return None
 
-        _authenticateCredentials = CachingMethod(_authenticateCredentials, id='ERP5UserManager_authenticateCredentials')
-        return _authenticateCredentials(login=credentials.get('login'), password=credentials.get('password'), path=self.getPhysicalPath())
+        _authenticateCredentials = CachingMethod(_authenticateCredentials,
+                                    id='ERP5UserManager_authenticateCredentials')
+        return _authenticateCredentials(
+                      login=credentials.get('login'),
+                      password=credentials.get('password'),
+                      path=self.getPhysicalPath())
 
     #
     #   IUserEnumerationPlugin implementation
     #
     security.declarePrivate( 'enumerateUsers' )
-    def enumerateUsers(self, id=None, login=None, exact_match=False, sort_by=None, max_results=None, **kw):
+    def enumerateUsers(self, id=None, login=None, exact_match=False,
+                       sort_by=None, max_results=None, **kw):
         """ See IUserEnumerationPlugin.
         """
         def _enumerateUsers(id_tuple, exact_match, path):
@@ -141,7 +147,8 @@
 
             return tuple(user_info)
 
-        _enumerateUsers = CachingMethod(_enumerateUsers, id='ERP5UserManager_enumerateUsers')
+        _enumerateUsers = CachingMethod(_enumerateUsers,
+                                        id='ERP5UserManager_enumerateUsers')
 
         if id is None:
           id = login
@@ -149,7 +156,9 @@
           id = (id,)
         if isinstance(id, list):
           id = tuple(id)
-        return _enumerateUsers(id_tuple=id, exact_match=exact_match, path=self.getPhysicalPath())
+        return _enumerateUsers(id_tuple=id,
+                               exact_match=exact_match,
+                               path=self.getPhysicalPath())
 
     def getUserByLogin(self, login):
         """
@@ -164,7 +173,8 @@
         if sm.getUser() != SUPER_USER:
           newSecurityManager(self, self.getUser(SUPER_USER))
 
-        result = self.getPortalObject().portal_catalog(portal_type="Person", reference=login)
+        result = self.getPortalObject().portal_catalog(
+                                  portal_type="Person", reference=login)
 
         setSecurityManager(sm)
         return [item.getObject() for item in result]




More information about the Erp5-report mailing list