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
Labels
Merge Requests
146
Merge Requests
146
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
35f304bf
Commit
35f304bf
authored
Nov 04, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5: Person.setReference should check ERP5LoginUserManager as well.
parent
6c097ab4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
product/ERP5/Document/Person.py
product/ERP5/Document/Person.py
+3
-2
No files found.
product/ERP5/Document/Person.py
View file @
35f304bf
...
...
@@ -38,6 +38,7 @@ from Products.ERP5.mixin.login_account_provider import LoginAccountProviderMixin
try
:
from
Products
import
PluggableAuthService
from
Products.ERP5Security.ERP5UserManager
import
ERP5UserManager
from
Products.ERP5Security.ERP5LoginUserManager
import
ERP5LoginUserManager
except
ImportError
:
PluggableAuthService
=
None
...
...
@@ -128,7 +129,7 @@ class Person(Node, LoginAccountProviderMixin, EncryptedPasswordMixin):
- we want to apply a different permission
- we want to prevent duplicated user ids, but only when
PAS _AND_
ERP5UserManager
are used
PAS _AND_
(ERP5UserManager or ERP5LoginUserManager)
are used
"""
activate_kw
=
{}
portal
=
self
.
getPortalObject
()
...
...
@@ -143,7 +144,7 @@ class Person(Node, LoginAccountProviderMixin, EncryptedPasswordMixin):
plugin_list
=
acl_users
.
plugins
.
listPlugins
(
PluggableAuthService
.
interfaces
.
plugins
.
IUserEnumerationPlugin
)
for
plugin_name
,
plugin_value
in
plugin_list
:
if
isinstance
(
plugin_value
,
ERP5UserManager
):
if
isinstance
(
plugin_value
,
(
ERP5UserManager
,
ERP5LoginUserManager
)
):
user_list
=
acl_users
.
searchUsers
(
id
=
value
,
exact_match
=
True
)
if
len
(
user_list
)
>
0
:
...
...
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