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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
5aeaf990
Commit
5aeaf990
authored
Dec 02, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reference query should be definitely exact match.
otherwise login like 'ASTAIRE AND ROGERS' does not work.
parent
cd42e66d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
product/ERP5Security/ERP5GroupManager.py
product/ERP5Security/ERP5GroupManager.py
+2
-1
No files found.
product/ERP5Security/ERP5GroupManager.py
View file @
5aeaf990
...
@@ -27,6 +27,7 @@ from Products.ERP5Type.Cache import CachingMethod
...
@@ -27,6 +27,7 @@ from Products.ERP5Type.Cache import CachingMethod
from
Products.ERP5Type.ERP5Type
\
from
Products.ERP5Type.ERP5Type
\
import
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT
import
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
from
Products.PluggableAuthService.PropertiedUser
import
PropertiedUser
from
Products.PluggableAuthService.PropertiedUser
import
PropertiedUser
from
ZODB.POSException
import
ConflictError
from
ZODB.POSException
import
ConflictError
...
@@ -120,7 +121,7 @@ class ERP5GroupManager(BasePlugin):
...
@@ -120,7 +121,7 @@ class ERP5GroupManager(BasePlugin):
# get the person from its reference - no security check needed
# get the person from its reference - no security check needed
catalog_result
=
self
.
portal_catalog
.
unrestrictedSearchResults
(
catalog_result
=
self
.
portal_catalog
.
unrestrictedSearchResults
(
portal_type
=
"Person"
,
reference
=
user_name
)
portal_type
=
"Person"
,
query
=
SimpleQuery
(
reference
=
user_name
)
)
if
len
(
catalog_result
)
!=
1
:
# we won't proceed with groups
if
len
(
catalog_result
)
!=
1
:
# we won't proceed with groups
if
len
(
catalog_result
)
>
1
:
# configuration is screwed
if
len
(
catalog_result
)
>
1
:
# configuration is screwed
raise
ConsistencyError
,
'There is more than one Person whose
\
raise
ConsistencyError
,
'There is more than one Person whose
\
...
...
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