Commit 6e4b7a7c authored by Mohamadou Mbengue's avatar Mohamadou Mbengue

add a script in setUpEgovInstance to allow acces on Persons and Organisations...

add a script in setUpEgovInstance to allow acces on Persons and Organisations to administrative agents

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36651 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6c526349
......@@ -33,6 +33,29 @@ from Products import ERP5Security
from Products import PluggableAuthService
from zLOG import LOG, WARNING, INFO
def allowAccessOnPersonAndOrganisation(self):
'''use safi PAS to be able to login organisation'''
self.portal = self.getPortalObject()
person_portal_type = self.portal.portal_types.getTypeInfo('Person')
person_module_portal_type = self.portal.portal_types.getTypeInfo('Person Module')
organisation_portal_type = self.portal.portal_types.getTypeInfo('Organisation')
organisation_module_portal_type = self.portal.portal_types.getTypeInfo('Organisation Module')
portal_type_list = (person_portal_type, person_module_portal_type, organisation_portal_type, \
organisation_module_portal_type)
role_category_list = ['role/gouvernement']
for ptype in portal_type_list:
role_info_list=[role_info.getTitle() for role_info in ptype.contentValues(portal_type='Role Information')]
if 'Agent Administratif' not in role_info_list:
ptype.newContent(portal_type='Role Information',
title='Agent Administratif',
role_name='Auditor',
role_category_list=role_category_list)
return '- Access on Person and Organisation allowed for administrative agent'
def enableEgovProcedureLogin(self, portal_type):
'''
set properties to enable the login on Person and Organisation
......@@ -112,6 +135,7 @@ def setUpInstance(self):
'''call all other set up method to prepare the site for eGOV Instance'''
message_list = []
message_list.append(setUpEGovSecurityManager(self))
message_list.append(allowAccessOnPersonAndOrganisation(self))
message_list.append('')
message_list.append('Set Up sequence completed')
......
2010-06-28 mohamadou
* add a script in setUpEgovInstance to allow acces on Persons and Organisations to administrative agents
2010-06-26 mayoro
* correct previous commit, use contentValues because of caching method
......
653
\ No newline at end of file
654
\ 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