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
Titouan Soulard
erp5
Commits
de4891d7
Commit
de4891d7
authored
Nov 30, 2015
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! ERP5Security: cleanup. fix indentation and remove unused import.
parent
975ad4d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
product/ERP5Security/ERP5UserManager.py
product/ERP5Security/ERP5UserManager.py
+13
-15
No files found.
product/ERP5Security/ERP5UserManager.py
View file @
de4891d7
...
...
@@ -18,8 +18,6 @@
from
Products.ERP5Type.Globals
import
InitializeClass
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.AuthEncoding
import
pw_validate
from
AccessControl.SecurityManagement
import
getSecurityManager
,
\
setSecurityManager
,
newSecurityManager
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
Products.PluggableAuthService.PluggableAuthService
import
\
_SWALLOWABLE_PLUGIN_EXCEPTIONS
...
...
@@ -42,17 +40,17 @@ manage_addERP5UserManagerForm = PageTemplateFile(
__name__
=
'manage_addERP5UserManagerForm'
)
def
addERP5UserManager
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
""" Add a ERP5UserManager to a Pluggable Auth Service. """
""" Add a ERP5UserManager to a Pluggable Auth Service. """
eum
=
ERP5UserManager
(
id
,
title
)
dispatcher
.
_setObject
(
eum
.
getId
(),
eum
)
eum
=
ERP5UserManager
(
id
,
title
)
dispatcher
.
_setObject
(
eum
.
getId
(),
eum
)
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
'%s/manage_workspace'
'?manage_tabs_message='
'ERP5UserManager+added.'
%
dispatcher
.
absolute_url
())
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
'%s/manage_workspace'
'?manage_tabs_message='
'ERP5UserManager+added.'
%
dispatcher
.
absolute_url
())
class
_AuthenticationFailure
(
Exception
):
"""Raised when authentication failed, to prevent caching the fact that a user
...
...
@@ -228,13 +226,13 @@ class ERP5UserManager(BasePlugin):
id_list
=
[]
for
user_id
in
id
:
if
SUPER_USER
==
user_id
:
info
=
{
'id'
:
SUPER_USER
info
=
{
'id'
:
SUPER_USER
,
'login'
:
SUPER_USER
,
'pluginid'
:
plugin_id
}
user_info
.
append
(
info
)
}
user_info
.
append
(
info
)
else
:
id_list
.
append
(
user_id
)
id_list
.
append
(
user_id
)
if
id_list
:
for
user
in
self
.
getUserByLogin
(
tuple
(
id_list
),
exact_match
=
exact_match
):
...
...
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