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
8041c090
Commit
8041c090
authored
Jun 16, 2023
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Products.ERP5Security: Declare module security locally
For simplicity and readability.
parent
e0b68bdb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
product/ERP5Security/ERP5UserManager.py
product/ERP5Security/ERP5UserManager.py
+2
-0
product/ERP5Security/__init__.py
product/ERP5Security/__init__.py
+0
-4
No files found.
product/ERP5Security/ERP5UserManager.py
View file @
8041c090
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
from
six
import
string_types
as
basestring
from
six
import
string_types
as
basestring
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.Globals
import
InitializeClass
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.SecurityInfo
import
ModuleSecurityInfo
from
AccessControl.AuthEncoding
import
pw_validate
from
AccessControl.AuthEncoding
import
pw_validate
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
Products.PluggableAuthService.PluggableAuthService
import
\
from
Products.PluggableAuthService.PluggableAuthService
import
\
...
@@ -57,6 +58,7 @@ class _AuthenticationFailure(Exception):
...
@@ -57,6 +58,7 @@ class _AuthenticationFailure(Exception):
etc...)
etc...)
"""
"""
ModuleSecurityInfo
(
__name__
).
declarePublic
(
'getUserByLogin'
)
@
transactional_cached
(
lambda
portal
,
*
args
:
args
)
@
transactional_cached
(
lambda
portal
,
*
args
:
args
)
def
getUserByLogin
(
portal
,
login
,
exact_match
=
True
):
def
getUserByLogin
(
portal
,
login
,
exact_match
=
True
):
if
isinstance
(
login
,
basestring
):
if
isinstance
(
login
,
basestring
):
...
...
product/ERP5Security/__init__.py
View file @
8041c090
...
@@ -238,7 +238,3 @@ def initialize(context):
...
@@ -238,7 +238,3 @@ def initialize(context):
,
visibility
=
None
,
visibility
=
None
,
icon
=
'www/portal.gif'
,
icon
=
'www/portal.gif'
)
)
from
AccessControl.SecurityInfo
import
ModuleSecurityInfo
ModuleSecurityInfo
(
'Products.ERP5Security.ERP5UserManager'
).
declarePublic
(
'getUserByLogin'
)
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