Commit 0f648f73 authored by Ivan Tyagov's avatar Ivan Tyagov

Use Zope 2.12 style of calling factory (i.e. importing directly).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43542 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8254f9e6
...@@ -32,6 +32,8 @@ from Testing import ZopeTestCase ...@@ -32,6 +32,8 @@ from Testing import ZopeTestCase
from Products import ERP5Security from Products import ERP5Security
from Products import PluggableAuthService from Products import PluggableAuthService
from zLOG import LOG, WARNING, INFO from zLOG import LOG, WARNING, INFO
from Products.ERP5eGovSecurity.EGOVUserManager import addEGOVUserManager
from Products.ERP5eGovSecurity.EGOVGroupManager import addEGOVGroupManager
def allowAccessOnContributionRegistryPortalTypes(self): def allowAccessOnContributionRegistryPortalTypes(self):
''' Set Type Acquire Local Role ''' ''' Set Type Acquire Local Role '''
...@@ -97,7 +99,7 @@ def enableEgovProcedureLogin(self, portal_type): ...@@ -97,7 +99,7 @@ def enableEgovProcedureLogin(self, portal_type):
def setUpEGovSecurityManager(self): def setUpEGovSecurityManager(self):
'''use safi PAS to be able to login organisation''' '''use safi PAS to be able to login organisation'''
portal = self.getPortalObject() portal = self.getPortalObject()
acl_users = portal.acl_users acl_users = portal.acl_users
...@@ -107,10 +109,12 @@ def setUpEGovSecurityManager(self): ...@@ -107,10 +109,12 @@ def setUpEGovSecurityManager(self):
# don't add it if it's already here # don't add it if it's already here
if {'meta_type': 'EGOV User Manager', 'id': 'egov_users'} not in \ if {'meta_type': 'EGOV User Manager', 'id': 'egov_users'} not in \
erp5security_dispatcher._d._objects: erp5security_dispatcher._d._objects:
erp5security_dispatcher.addEGOVUserManager('egov_users') addEGOVUserManager(erp5security_dispatcher, 'egov_users')
if {'meta_type': 'EGOV Group Manager', 'id': 'egov_groups'} not in \ if {'meta_type': 'EGOV Group Manager', 'id': 'egov_groups'} not in \
erp5security_dispatcher._d._objects : erp5security_dispatcher._d._objects :
erp5security_dispatcher.addEGOVGroupManager('egov_groups') addEGOVGroupManager(erp5security_dispatcher, 'egov_groups')
# Register ERP5UserManager Interface # Register ERP5UserManager Interface
acl_users.egov_users.manage_activateInterfaces(('IAuthenticationPlugin', acl_users.egov_users.manage_activateInterfaces(('IAuthenticationPlugin',
'IUserEnumerationPlugin',)) 'IUserEnumerationPlugin',))
......
747 748
\ No newline at end of file
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