Commit dc67f5b1 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Security: Implement new interfaces from PluggableAuthService 1.10.0

We do nothing on these methods, but we comply to the interface.
parent 014f88b3
...@@ -303,5 +303,16 @@ class ERP5LoginUserManager(BasePlugin): ...@@ -303,5 +303,16 @@ class ERP5LoginUserManager(BasePlugin):
}) })
return tuple(result) return tuple(result)
security.declarePrivate('updateUser')
def updateUser(self, user_id, login_name):
# Operation not supported here
return False
security.declarePrivate('updateEveryLoginName')
def updateEveryLoginName(self, quit_on_first_error=True):
# Operation not supported here
raise NotImplementedError()
classImplements(ERP5LoginUserManager, IAuthenticationPlugin, IUserEnumerationPlugin) classImplements(ERP5LoginUserManager, IAuthenticationPlugin, IUserEnumerationPlugin)
InitializeClass(ERP5LoginUserManager) InitializeClass(ERP5LoginUserManager)
...@@ -278,6 +278,16 @@ class ERP5UserManager(BasePlugin): ...@@ -278,6 +278,16 @@ class ERP5UserManager(BasePlugin):
for user in user_list for user in user_list
]) ])
security.declarePrivate( 'updateUser' )
def updateUser(self, user_id, login_name):
# Operation not supported here
return False
security.declarePrivate( 'updateEveryLoginName' )
def updateEveryLoginName(self, quit_on_first_error=True):
# Operation not supported here
raise NotImplementedError()
def getUserByLogin(self, login, exact_match=True): def getUserByLogin(self, login, exact_match=True):
# Search the Catalog for login and return a list of person objects # Search the Catalog for login and return a list of person objects
# login can be a string or a list of strings # login can be a string or a list of strings
......
...@@ -744,6 +744,14 @@ class TestPASAPI(UserManagementTestCase): ...@@ -744,6 +744,14 @@ class TestPASAPI(UserManagementTestCase):
verifyClass(IAuthenticationPlugin, ERP5UserManager) verifyClass(IAuthenticationPlugin, ERP5UserManager)
verifyClass(IUserEnumerationPlugin, ERP5UserManager) verifyClass(IUserEnumerationPlugin, ERP5UserManager)
def test_LoginUserManagerInterfaces(self):
"""Tests login user manager plugin respects interfaces."""
from Products.PluggableAuthService.interfaces.plugins import\
IAuthenticationPlugin, IUserEnumerationPlugin
from Products.ERP5Security.ERP5LoginUserManager import ERP5LoginUserManager
verifyClass(IAuthenticationPlugin, ERP5LoginUserManager)
verifyClass(IUserEnumerationPlugin, ERP5LoginUserManager)
def test_UserFolder(self): def test_UserFolder(self):
"""Tests user folder has correct meta type.""" """Tests user folder has correct meta type."""
self.assertTrue(isinstance(self.getUserFolder(), self.assertTrue(isinstance(self.getUserFolder(),
......
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