Commit bf89211c authored by Alexandre Boeglin's avatar Alexandre Boeglin

sm.getUser() returns a User object, we need to getId() on it before comparing

with SUPER_USER


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14542 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 505716d1
......@@ -93,7 +93,7 @@ class ERP5GroupManager(BasePlugin):
# 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
......
......@@ -96,7 +96,7 @@ class ERP5UserManager(BasePlugin):
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 @@ class ERP5UserManager(BasePlugin):
# 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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment