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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 22 11:41:59 CEST 2007


Author: alex
Date: Tue May 22 11:41:58 2007
New Revision: 14542

URL: http://svn.erp5.org?rev=14542&view=rev
Log:
sm.getUser() returns a User object, we need to getId() on it before comparing
with SUPER_USER

Modified:
    erp5/trunk/products/ERP5Security/ERP5GroupManager.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=14542&r1=14541&r2=14542&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/ERP5GroupManager.py (original)
+++ erp5/trunk/products/ERP5Security/ERP5GroupManager.py Tue May 22 11:41:58 2007
@@ -93,7 +93,7 @@
       # because we aren't logged in, we have to create our own
       # SecurityManager to be able to access the Catalog
       sm = getSecurityManager()
-      if sm.getUser() != SUPER_USER:
+      if sm.getUser().getId() != SUPER_USER:
         newSecurityManager(self, self.getUser(SUPER_USER))
       try:
         # To get the complete list of groups, we try to call the

Modified: erp5/trunk/products/ERP5Security/ERP5UserManager.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Security/ERP5UserManager.py?rev=14542&r1=14541&r2=14542&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/ERP5UserManager.py (original)
+++ erp5/trunk/products/ERP5Security/ERP5UserManager.py Tue May 22 11:41:58 2007
@@ -96,7 +96,7 @@
             user = user_list[0]
 
             sm = getSecurityManager()
-            if sm.getUser() != SUPER_USER:
+            if sm.getUser().getId() != SUPER_USER:
               newSecurityManager(self, self.getUser(SUPER_USER))
             try:
               if pw_validate(user.getPassword(), password) and\
@@ -175,7 +175,7 @@
         # because we aren't logged in, we have to create our own
         # SecurityManager to be able to access the Catalog
         sm = getSecurityManager()
-        if sm.getUser() != SUPER_USER:
+        if sm.getUser().getId() != SUPER_USER:
           newSecurityManager(self, self.getUser(SUPER_USER))
 
         try:




More information about the Erp5-report mailing list