[Erp5-report] r27239 - /erp5/trunk/products/ERP5Wizard/PAS/ERP5RemoteUserManager.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu May 28 18:03:44 CEST 2009
Author: ivan
Date: Thu May 28 18:03:43 2009
New Revision: 27239
URL: http://svn.erp5.org?rev=27239&view=rev
Log:
Apply changes in r27234
Modified:
erp5/trunk/products/ERP5Wizard/PAS/ERP5RemoteUserManager.py
Modified: erp5/trunk/products/ERP5Wizard/PAS/ERP5RemoteUserManager.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/PAS/ERP5RemoteUserManager.py?rev=27239&r1=27238&r2=27239&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Wizard/PAS/ERP5RemoteUserManager.py [utf8] (original)
+++ erp5/trunk/products/ERP5Wizard/PAS/ERP5RemoteUserManager.py [utf8] Thu May 28 18:03:43 2009
@@ -25,7 +25,7 @@
IUserEnumerationPlugin
from Products.ERP5Type.Cache import CachingMethod
from DateTime import DateTime
-from Products.ERP5Security.ERP5UserManager import ERP5UserManager, SUPER_USER
+from Products.ERP5Security.ERP5UserManager import ERP5UserManager, SUPER_USER, _AuthenticationFailure
manage_addERP5RemoteUserManagerForm = PageTemplateFile(
@@ -75,7 +75,7 @@
user_list = self.getUserByLogin(login)
if not user_list:
- return None
+ raise _AuthenticationFailure()
user = user_list[0]
@@ -106,15 +106,18 @@
finally:
setSecurityManager(sm)
- return None
+ raise _AuthenticationFailure()
_authenticateCredentials = CachingMethod(_authenticateCredentials,
id='ERP5RemoteUserManager_authenticateCredentials',
cache_factory='erp5_content_short')
- return _authenticateCredentials(
- login=credentials.get('login'),
- password=credentials.get('password'),
- path=self.getPhysicalPath())
+ try:
+ return _authenticateCredentials(
+ login=credentials.get('login'),
+ password=credentials.get('password'),
+ path=self.getPhysicalPath())
+ except _AuthenticationFailure:
+ return None
classImplements( ERP5RemoteUserManager
, IAuthenticationPlugin
More information about the Erp5-report
mailing list