Commit 0a545f1b authored by Romain Courteaud's avatar Romain Courteaud

Give auditor to shadow on organisations.

parent be0c90bc
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
<role id='R-MEMBER'> <role id='R-MEMBER'>
<item>Auditor</item> <item>Auditor</item>
</role> </role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='zope'> <role id='zope'>
<item>Owner</item> <item>Owner</item>
</role> </role>
......
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
...@@ -14,4 +14,9 @@ ...@@ -14,4 +14,9 @@
<multi_property id='category'>group/company</multi_property> <multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
</role> </role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
...@@ -9,4 +9,9 @@ ...@@ -9,4 +9,9 @@
<multi_property id='category'>role/member</multi_property> <multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property> <multi_property id='base_category'>role</multi_property>
</role> </role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles> </type_roles>
\ No newline at end of file
...@@ -389,9 +389,10 @@ class TestOrganisation(TestSlapOSGroupRoleSecurityMixin): ...@@ -389,9 +389,10 @@ class TestOrganisation(TestSlapOSGroupRoleSecurityMixin):
portal_type='Organisation') portal_type='Organisation')
organisation.updateLocalRolesOnSecurityGroups() organisation.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(organisation, self.assertSecurityGroup(organisation,
['G-COMPANY', self.user_id, 'R-MEMBER'], False) ['G-COMPANY', self.user_id, 'R-MEMBER', 'R-SHADOW-PERSON'], False)
self.assertRoles(organisation, 'G-COMPANY', ['Assignor']) self.assertRoles(organisation, 'G-COMPANY', ['Assignor'])
self.assertRoles(organisation, 'R-MEMBER', ['Auditor']) self.assertRoles(organisation, 'R-MEMBER', ['Auditor'])
self.assertRoles(organisation, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(organisation, self.user_id, ['Owner']) self.assertRoles(organisation, self.user_id, ['Owner'])
test_Member = test_GroupCompany test_Member = test_GroupCompany
...@@ -400,10 +401,11 @@ class TestOrganisationModule(TestSlapOSGroupRoleSecurityMixin): ...@@ -400,10 +401,11 @@ class TestOrganisationModule(TestSlapOSGroupRoleSecurityMixin):
def test(self): def test(self):
module = self.portal.organisation_module module = self.portal.organisation_module
self.assertSecurityGroup(module, self.assertSecurityGroup(module,
['G-COMPANY', 'R-COMPUTER', 'R-MEMBER', 'zope'], False) ['G-COMPANY', 'R-COMPUTER', 'R-MEMBER', 'zope', 'R-SHADOW-PERSON'], False)
self.assertRoles(module, 'R-MEMBER', ['Auditor']) self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'R-COMPUTER', ['Auditor']) self.assertRoles(module, 'R-COMPUTER', ['Auditor'])
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author']) self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner']) self.assertRoles(module, 'zope', ['Owner'])
class TestPDF(TestSlapOSGroupRoleSecurityMixin): class TestPDF(TestSlapOSGroupRoleSecurityMixin):
......
137 138
\ No newline at end of file \ No newline at end of file
...@@ -20,6 +20,7 @@ meeting_module ...@@ -20,6 +20,7 @@ meeting_module
notification_message_module notification_message_module
open_sale_order_module open_sale_order_module
organisation_module organisation_module
organisation_module/slapos
person_module person_module
portal_contributions portal_contributions
portal_gadgets portal_gadgets
......
...@@ -20,6 +20,7 @@ meeting_module ...@@ -20,6 +20,7 @@ meeting_module
notification_message_module notification_message_module
open_sale_order_module open_sale_order_module
organisation_module organisation_module
organisation_module/slapos
person_module person_module
portal_contributions portal_contributions
portal_gadgets portal_gadgets
......
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