Commit b52f1520 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: give read access to sale packing list to accountant and sale people

parent 31051fe0
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<role id='F-ACCOUNTING*'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<role id='F-SALE*'>
<item>Auditor</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Auditor</principal>
<principal id='G-COMPANY'>Author</principal>
</local_role_group_id>
<local_role_group_id id='user'>
<principal id='R-MEMBER'>Auditor</principal>
<local_role_group_id id='function'>
<principal id='F-ACCOUNTING*'>Auditor</principal>
<principal id='F-SALE*'>Auditor</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
<type_roles>
<role id='Author; Auditor'>
<property id='title'>Group company</property>
<multi_property id='categories'>local_role_group/group</multi_property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
<role id='Auditor'>
<property id='title'>Accountant</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/accounting*</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='categories'>local_role_group/user</multi_property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
<property id='title'>Sale</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/sale*</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Group company</property>
<multi_property id='categories'>local_role_group/group</multi_property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
<property id='title'>Accountant</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/accounting*</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Subscription Customer</property>
<property id='description'>python: here.Base_useSaleTradeConditionReference(('slapos_subscription_trade_condition', 'slapos_aggregated_trade_condition', 'slapos_aggregated_subscription_trade_condition'))</property>
<property id='condition'>python: False</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
<multi_property id='categories'>local_role_group/user</multi_property>
<multi_property id='base_category'>destination_decision</multi_property>
<property id='title'>Sale</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/sale*</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -110,36 +110,6 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
integration_site.workflow_history['edit_workflow'][-1]['comment'])
def test_SalePackingList_setSpecialise(self):
self._makePerson()
sale_packing_list = self.portal.sale_packing_list_module.newContent(
destination_decision_value=self.person_user,
portal_type='Sale Packing List')
self.assertSecurityGroup(sale_packing_list, ['G-COMPANY', self.user_id], False)
sale_packing_list.edit(
specialise="sale_trade_condition_module/slapos_subscription_trade_condition")
self.commit()
self.assertSecurityGroup(sale_packing_list, ['G-COMPANY', self.user_id,
self.person_user_id], False)
def test_SalePackingList_setDestinationDecision(self):
self._makePerson()
sale_packing_list = self.portal.sale_packing_list_module.newContent(
specialise="sale_trade_condition_module/slapos_subscription_trade_condition",
portal_type='Sale Packing List')
self.assertSecurityGroup(sale_packing_list, ['G-COMPANY', self.user_id], False)
sale_packing_list.edit(
destination_decision_value=self.person_user)
self.commit()
self.assertSecurityGroup(sale_packing_list, ['G-COMPANY', self.user_id,
self.person_user_id], False)
def test_RestrictedAccessToken_setAgent(self):
self._makePerson()
token = self.portal.access_token_module.newContent(
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interaction Workflow Interaction" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>after_script/portal_workflow/local_permission_slapos_interaction_workflow/script_Base_updateAllLocalRoles</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interaction_SalePackingList_edit</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interaction Workflow Interaction</string> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<tuple>
<string>Sale Packing List</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type_group_filter</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>trigger_method_id</string> </key>
<value>
<tuple>
<string>_setDestinationDecision.*</string>
<string>_setSpecialise.*</string>
</tuple>
</value>
</item>
<item>
<key> <string>trigger_once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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