Commit b5b946a9 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: customer must be able to create token for slapos client

parent 378a2dd2
<local_roles_item> <local_roles_item>
<local_roles> <local_roles>
<role id='F-CUSTOMER'>
<item>Author</item>
</role>
<role id='F-PRODUCTION*'> <role id='F-PRODUCTION*'>
<item>Author</item> <item>Author</item>
</role> </role>
</local_roles> </local_roles>
<local_role_group_ids> <local_role_group_ids>
<local_role_group_id id='function'> <local_role_group_id id='function'>
<principal id='F-CUSTOMER'>Author</principal>
<principal id='F-PRODUCTION*'>Author</principal> <principal id='F-PRODUCTION*'>Author</principal>
</local_role_group_id> </local_role_group_id>
</local_role_group_ids> </local_role_group_ids>
......
<type_roles> <type_roles>
<role id='Author'>
<property id='title'>Customer</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/customer</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Author'> <role id='Author'>
<property id='title'>Production</property> <property id='title'>Production</property>
<multi_property id='categories'>local_role_group/function</multi_property> <multi_property id='categories'>local_role_group/function</multi_property>
......
...@@ -2034,8 +2034,9 @@ class TestAccessTokenModule(TestSlapOSGroupRoleSecurityMixin): ...@@ -2034,8 +2034,9 @@ class TestAccessTokenModule(TestSlapOSGroupRoleSecurityMixin):
def test_AccessTokenModule(self): def test_AccessTokenModule(self):
module = self.portal.access_token_module module = self.portal.access_token_module
self.assertSecurityGroup(module, self.assertSecurityGroup(module,
['F-PRODUCTION*', module.Base_getOwnerId()], False) ['F-PRODUCTION*', 'F-CUSTOMER', module.Base_getOwnerId()], False)
self.assertRoles(module, 'F-PRODUCTION*', ['Author']) self.assertRoles(module, 'F-PRODUCTION*', ['Author'])
self.assertRoles(module, 'F-CUSTOMER', ['Author'])
self.assertRoles(module, module.Base_getOwnerId(), ['Owner']) self.assertRoles(module, module.Base_getOwnerId(), ['Owner'])
......
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