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
Alexander Emmerich
erp5
Commits
e8ae14a5
Commit
e8ae14a5
authored
Oct 27, 2016
by
Kazuhiko Shiozaki
Committed by
Vincent Pelletier
Dec 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use getUserName() explicitly instead of __str__().
parent
b0113856
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):
return
[]
if
isinstance
(
login
,
list
):
login
=
tuple
(
login
)
elif
not
isinstance
(
login
,
tuple
):
login
=
str
(
login
)
elif
not
isinstance
(
login
,
(
tuple
,
str
)
):
login
=
login
.
getUserName
(
)
try
:
return
getUserByLogin
(
self
.
getPortalObject
(),
login
,
exact_match
)
except
ConflictError
:
...
...
product/ERP5Type/UnrestrictedMethod.py
View file @
e8ae14a5
...
...
@@ -105,9 +105,9 @@ def super_user():
uf
=
getSite
().
acl_users
role_list
=
uf
.
valid_roles
()
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.
user_id
=
s
tr
(
system
)
user_id
=
s
ystem
.
getUserName
(
)
else
:
user_id
=
user
.
getId
()
super_user
=
PrivilegedUser
(
user_id
,
None
,
...
...
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