Commit 432ba160 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Kazuhiko Shiozaki

Products.ERP5Security: Declare module security locally

For simplicity and readability.
parent 94786c5d
......@@ -18,6 +18,7 @@
from six import string_types as basestring
from Products.ERP5Type.Globals import InitializeClass
from AccessControl import ClassSecurityInfo
from AccessControl.SecurityInfo import ModuleSecurityInfo
from AccessControl.AuthEncoding import pw_validate
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.PluggableAuthService.PluggableAuthService import \
......@@ -57,6 +58,7 @@ class _AuthenticationFailure(Exception):
etc...)
"""
ModuleSecurityInfo(__name__).declarePublic('getUserByLogin')
@transactional_cached(lambda portal, *args: args)
def getUserByLogin(portal, login, exact_match=True):
if isinstance(login, basestring):
......
......@@ -238,7 +238,3 @@ def initialize(context):
, visibility=None
, icon='www/portal.gif'
)
from AccessControl.SecurityInfo import ModuleSecurityInfo
ModuleSecurityInfo('Products.ERP5Security.ERP5UserManager').declarePublic(
'getUserByLogin')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment