Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
c81f2cb0
Commit
c81f2cb0
authored
May 15, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Form: fix argument name, createPreferenceForUser expect user_id
parent
9c7b83b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/ERP5Form/PreferenceTool.py
product/ERP5Form/PreferenceTool.py
+3
-3
No files found.
product/ERP5Form/PreferenceTool.py
View file @
c81f2cb0
...
@@ -270,14 +270,14 @@ class PreferenceTool(BaseTool):
...
@@ -270,14 +270,14 @@ class PreferenceTool(BaseTool):
security
.
declareProtected
(
Permissions
.
ManagePortal
,
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'createPreferenceForUser'
)
'createPreferenceForUser'
)
def
createPreferenceForUser
(
self
,
user
name
,
enable
=
True
):
def
createPreferenceForUser
(
self
,
user
_id
,
enable
=
True
):
"""Creates a preference for a given user, and optionnally enable the
"""Creates a preference for a given user, and optionnally enable the
preference.
preference.
"""
"""
user_folder
=
self
.
acl_users
user_folder
=
self
.
acl_users
user
=
user_folder
.
getUserById
(
user
name
)
user
=
user_folder
.
getUserById
(
user
_id
)
if
user
is
None
:
if
user
is
None
:
raise
ValueError
(
"User %r not found"
%
(
user
name
,
))
raise
ValueError
(
"User %r not found"
%
(
user
_id
,
))
security_manager
=
getSecurityManager
()
security_manager
=
getSecurityManager
()
try
:
try
:
newSecurityManager
(
None
,
user
.
__of__
(
user_folder
))
newSecurityManager
(
None
,
user
.
__of__
(
user_folder
))
...
...
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