Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.core
Commits
61ab87d4
Commit
61ab87d4
authored
Jan 29, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give user view permission on his subscription pl.
parent
ce45a47b
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
154 additions
and
1 deletion
+154
-1
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Sale%20Packing%20List.xml
...rp5/PortalTypeRolesTemplateItem/Sale%20Packing%20List.xml
+6
-0
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+4
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
..._erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
+17
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
...testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
+28
-0
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interactions/SalePackingList_edit.xml
...nteraction_workflow/interactions/SalePackingList_edit.xml
+97
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
...5/slapos_erp5/bt/template_portal_type_workflow_chain_list
+1
-0
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Sale%20Packing%20List.xml
View file @
61ab87d4
...
@@ -4,4 +4,10 @@
...
@@ -4,4 +4,10 @@
<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'
>
Subscription Customer
</property>
<property
id=
'condition'
>
python: here.getSpecialise() == 'sale_trade_condition_module/slapos_subscription_trade_condition'
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination_decision
</multi_property>
</role>
</type_roles>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
61ab87d4
...
@@ -39,6 +39,10 @@
...
@@ -39,6 +39,10 @@
<type>
Sale Invoice Transaction
</type>
<type>
Sale Invoice Transaction
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Sale Packing List
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<chain>
<type>
Slave Instance
</type>
<type>
Slave Instance
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
...
...
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
View file @
61ab87d4
...
@@ -829,6 +829,23 @@ class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
...
@@ -829,6 +829,23 @@ class TestSalePackingList(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
def
test_GroupCustomerSubscription
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
sale_packing_list_module
.
newContent
(
portal_type
=
'Sale Packing List'
,
destination_decision_value
=
person
,
specialise_value
=
self
.
portal
.
sale_trade_condition_module
.
\
slapos_subscription_trade_condition
,
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
,
reference
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
reference
,
[
'Auditor'
])
class
TestAccountingTransactionModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestAccountingTransactionModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
module
=
self
.
portal
.
accounting_module
module
=
self
.
portal
.
accounting_module
...
...
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
View file @
61ab87d4
...
@@ -588,3 +588,31 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
...
@@ -588,3 +588,31 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
self
.
person_reference
],
False
)
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"
)
transaction
.
commit
()
self
.
assertSecurityGroup
(
sale_packing_list
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
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
)
transaction
.
commit
()
self
.
assertSecurityGroup
(
sale_packing_list
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interactions/SalePackingList_edit.xml
0 → 100644
View file @
61ab87d4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionDefinition"
module=
"Products.ERP5.Interaction"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
activate_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<list>
<string>
Base_updateAllLocalRoles
</string>
</list>
</value>
</item>
<item>
<key>
<string>
before_commit_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SalePackingList_edit
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
_setDestinationDecision.*
</string>
<string>
_setSpecialise.*
</string>
</list>
</value>
</item>
<item>
<key>
<string>
once_per_transaction
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<list>
<string>
Sale Packing List
</string>
</list>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/bt/revision
View file @
61ab87d4
159
160
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
View file @
61ab87d4
...
@@ -8,6 +8,7 @@ Payment Transaction | local_permission_slapos_interaction_workflow
...
@@ -8,6 +8,7 @@ Payment Transaction | local_permission_slapos_interaction_workflow
Payzen Event | local_permission_slapos_interaction_workflow
Payzen Event | local_permission_slapos_interaction_workflow
Person | local_permission_slapos_interaction_workflow
Person | local_permission_slapos_interaction_workflow
Sale Invoice Transaction | local_permission_slapos_interaction_workflow
Sale Invoice Transaction | local_permission_slapos_interaction_workflow
Sale Packing List | local_permission_slapos_interaction_workflow
Slave Instance | local_permission_slapos_interaction_workflow
Slave Instance | local_permission_slapos_interaction_workflow
Software Installation | local_permission_slapos_interaction_workflow
Software Installation | local_permission_slapos_interaction_workflow
Software Instance | local_permission_slapos_interaction_workflow
Software Instance | local_permission_slapos_interaction_workflow
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment