Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
e8ae14a5
Commit
e8ae14a5
authored
8 years ago
by
Kazuhiko Shiozaki
Committed by
Vincent Pelletier
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use getUserName() explicitly instead of __str__().
parent
b0113856
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
product/ERP5Security/ERP5UserManager.py
product/ERP5Security/ERP5UserManager.py
+2
-2
product/ERP5Type/UnrestrictedMethod.py
product/ERP5Type/UnrestrictedMethod.py
+2
-2
No files found.
product/ERP5Security/ERP5UserManager.py
View file @
e8ae14a5
...
@@ -287,8 +287,8 @@ class ERP5UserManager(BasePlugin):
...
@@ -287,8 +287,8 @@ class ERP5UserManager(BasePlugin):
return
[]
return
[]
if
isinstance
(
login
,
list
):
if
isinstance
(
login
,
list
):
login
=
tuple
(
login
)
login
=
tuple
(
login
)
elif
not
isinstance
(
login
,
tuple
):
elif
not
isinstance
(
login
,
(
tuple
,
str
)
):
login
=
str
(
login
)
login
=
login
.
getUserName
(
)
try
:
try
:
return
getUserByLogin
(
self
.
getPortalObject
(),
login
,
exact_match
)
return
getUserByLogin
(
self
.
getPortalObject
(),
login
,
exact_match
)
except
ConflictError
:
except
ConflictError
:
...
...
This diff is collapsed.
Click to expand it.
product/ERP5Type/UnrestrictedMethod.py
View file @
e8ae14a5
...
@@ -105,9 +105,9 @@ def super_user():
...
@@ -105,9 +105,9 @@ def super_user():
uf
=
getSite
().
acl_users
uf
=
getSite
().
acl_users
role_list
=
uf
.
valid_roles
()
role_list
=
uf
.
valid_roles
()
if
anonymous
:
if
anonymous
:
# If the user is anonymous, use the
id
of the system user,
# If the user is anonymous, use the
user name
of the system user,
# so that it would not be treated as an unauthorized user.
# so that it would not be treated as an unauthorized user.
user_id
=
s
tr
(
system
)
user_id
=
s
ystem
.
getUserName
(
)
else
:
else
:
user_id
=
user
.
getId
()
user_id
=
user
.
getId
()
super_user
=
PrivilegedUser
(
user_id
,
None
,
super_user
=
PrivilegedUser
(
user_id
,
None
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment