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
Titouan Soulard
slapos.core
Commits
ab4024f6
Commit
ab4024f6
authored
Feb 01, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: WIP local roles test
parent
6299bd5c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
742 additions
and
1962 deletions
+742
-1962
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Subscription%20Request.xml
...p5/PortalTypeRolesTemplateItem/Subscription%20Request.xml
+2
-0
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+20
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+707
-1409
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
...testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
+1
-549
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interaction_ComputeNode_edit.xml
...pos_interaction_workflow/interaction_ComputeNode_edit.xml
+1
-4
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interaction_SaleInvoiceTransaction_edit.xml
...tion_workflow/interaction_SaleInvoiceTransaction_edit.xml
+4
-0
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interaction_SupportRequest_edit.xml
..._interaction_workflow/interaction_SupportRequest_edit.xml
+2
-0
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
...5/slapos_erp5/bt/template_portal_type_workflow_chain_list
+5
-0
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Subscription%20Request.xml
View file @
ab4024f6
...
...
@@ -22,6 +22,7 @@
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'category'
>
function/production/agent
</multi_property>
<multi_property
id=
'base_category'
>
source_project
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Source Project Production Manager
</property>
...
...
@@ -30,5 +31,6 @@
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'category'
>
function/production/manager
</multi_property>
<multi_property
id=
'base_category'
>
source_project
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
ab4024f6
<workflow_chain>
<chain>
<type>
Accounting Transaction
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Acknowledgement
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
...
...
@@ -7,6 +11,10 @@
<type>
Allocation Supply
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Balance Transaction
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Cloud Contract
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
...
...
@@ -95,6 +103,10 @@
<type>
Project
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Purchase Invoice Transaction
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Purchase Packing List
</type>
<workflow>
-immobilisation_movement_interaction_workflow
</workflow>
...
...
@@ -107,6 +119,10 @@
<type>
Purchase Packing List Line
</type>
<workflow>
-immobilisation_movement_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Regularisation Request
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Remote Node
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
...
...
@@ -155,6 +171,10 @@
<type>
Support Request
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Upgrade Decision
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Web Message
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
ab4024f6
This source diff could not be displayed because it is too large. You can
view the blob
instead.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
View file @
ab4024f6
...
...
@@ -34,76 +34,6 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self
.
person_reference
=
self
.
person_user
.
getReference
()
self
.
person_user_id
=
self
.
person_user
.
getUserId
()
def
test_ComputerModel_edit
(
self
):
self
.
_makePerson
()
model
=
self
.
portal
.
computer_model_module
.
newContent
(
portal_type
=
'Computer Model'
)
self
.
assertSecurityGroup
(
model
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
model
.
edit
(
source_administration
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
model
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_ComputerNetwork_edit
(
self
):
self
.
_makePerson
()
network
=
self
.
portal
.
computer_network_module
.
newContent
(
portal_type
=
'Computer Network'
)
self
.
assertSecurityGroup
(
network
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-SHADOW-PERSON'
],
False
)
network
.
edit
(
source_administration
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
network
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
,
'R-SHADOW-PERSON'
],
False
)
def
test_ComputeNode_setUserId
(
self
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
)
self
.
assertSecurityGroup
(
compute_node
,
[
'G-COMPANY'
,
self
.
user_id
,
compute_node
.
getUserId
()],
False
)
compute_node
.
edit
(
user_id
=
None
)
self
.
commit
()
self
.
assertSecurityGroup
(
compute_node
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
def
test_ComputeNode_setSourceAdministration
(
self
):
self
.
_makePerson
()
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
)
self
.
assertSecurityGroup
(
compute_node
,
[
'G-COMPANY'
,
self
.
user_id
,
compute_node
.
getUserId
()],
False
)
compute_node
.
edit
(
source_administration
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
compute_node
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
,
compute_node
.
getUserId
()],
False
)
def
test_ComputeNode_setAllocationScope
(
self
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
)
self
.
assertSecurityGroup
(
compute_node
,
[
'G-COMPANY'
,
self
.
user_id
,
compute_node
.
getUserId
()],
False
)
compute_node
.
edit
(
allocation_scope
=
'open/public'
)
self
.
commit
()
self
.
assertSecurityGroup
(
compute_node
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-SHADOW-PERSON'
,
compute_node
.
getUserId
()],
False
)
def
test_ComputeNode_setDestinationSection
(
self
):
self
.
_makePerson
()
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
)
self
.
assertSecurityGroup
(
compute_node
,
[
'G-COMPANY'
,
self
.
user_id
,
compute_node
.
getUserId
()],
False
)
compute_node
.
edit
(
source_administration
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
compute_node
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
,
compute_node
.
getUserId
()],
False
)
def
test_ComputeNode_reindexObject
(
self
):
compute_node
=
self
.
portal
.
compute_node_module
.
template_compute_node
\
...
...
@@ -130,35 +60,6 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self
.
assertEqual
(
comment
,
compute_node
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
test_InstanceTree_setReference
(
self
):
instance_tree
=
self
.
portal
.
instance_tree_module
.
newContent
(
portal_type
=
'Instance Tree'
)
self
.
assertSecurityGroup
(
instance_tree
,
[
self
.
user_id
,
instance_tree
.
getId
(),
'G-COMPANY'
],
False
)
instance_tree
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
self
.
commit
()
self
.
assertSecurityGroup
(
instance_tree
,
[
self
.
user_id
,
instance_tree
.
getReference
(),
'G-COMPANY'
],
False
)
def
test_InstanceTree_setDestinationSection
(
self
):
self
.
_makePerson
()
instance_tree
=
self
.
portal
.
instance_tree_module
.
newContent
(
portal_type
=
'Instance Tree'
)
self
.
assertSecurityGroup
(
instance_tree
,
[
self
.
user_id
,
instance_tree
.
getId
(),
'G-COMPANY'
],
False
)
instance_tree
.
edit
(
destination_section
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
instance_tree
,
[
self
.
user_id
,
instance_tree
.
getId
(),
self
.
person_user
.
getUserId
(),
'G-COMPANY'
],
False
)
def
test_Person_setReference
(
self
):
# Due the change of security the interaction workflow don't trigger
...
...
@@ -182,177 +83,6 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self
.
assertSecurityGroup
(
person
,
[
self
.
user_id
,
'G-COMPANY'
,
person
.
getUserId
(),
'SHADOW-%s'
%
person
.
getUserId
()],
False
)
def
test_SoftwareInstallation_setAggregate
(
self
):
installation
=
self
.
portal
.
software_installation_module
.
newContent
(
portal_type
=
'Software Installation'
)
self
.
assertSecurityGroup
(
installation
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
,
reference
=
'TESTC-%s'
%
self
.
generateNewId
())
installation
.
edit
(
aggregate
=
compute_node
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
installation
,
[
self
.
user_id
,
'G-COMPANY'
,
compute_node
.
getUserId
()],
False
)
def
test_SoftwareInstallation_setDestinationSection
(
self
):
installation
=
self
.
portal
.
software_installation_module
.
newContent
(
portal_type
=
'Software Installation'
)
self
.
assertSecurityGroup
(
installation
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
self
.
_makePerson
()
installation
.
edit
(
destination_section
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
installation
,
[
self
.
user_id
,
'G-COMPANY'
,
self
.
person_user
.
getUserId
()],
False
)
def
test_SoftwareInstance_setSpecialise
(
self
):
software_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
)
self
.
assertSecurityGroup
(
software_instance
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
instance_tree
=
self
.
portal
.
instance_tree_module
.
newContent
(
portal_type
=
'Instance Tree'
,
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
software_instance
.
edit
(
specialise
=
instance_tree
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
software_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
instance_tree
.
getReference
()],
False
)
def
test_SoftwareInstance_setAggregate
(
self
):
instance_tree
=
self
.
portal
.
instance_tree_module
.
newContent
(
portal_type
=
'Instance Tree'
,
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
software_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
,
specialise
=
instance_tree
.
getRelativeUrl
())
certificate_login
=
software_instance
.
newContent
(
portal_type
=
'Certificate Login'
)
self
.
assertSecurityGroup
(
software_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
instance_tree
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
certificate_login
,
[
self
.
user_id
,
software_instance
.
getUserId
()],
False
)
compute_node
=
self
.
portal
.
compute_node_module
.
template_compute_node
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
compute_node
.
edit
(
reference
=
'TESTC-%s'
%
self
.
generateNewId
())
partition
=
compute_node
.
newContent
(
portal_type
=
'Compute Partition'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
partition
,
'busy'
)
self
.
assertSecurityGroup
(
partition
,
[
self
.
user_id
],
True
)
software_instance
.
edit
(
aggregate
=
partition
.
getRelativeUrl
())
self
.
tic
()
self
.
assertSecurityGroup
(
software_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
compute_node
.
getUserId
(),
instance_tree
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
partition
,
[
self
.
user_id
,
instance_tree
.
getReference
()],
True
)
self
.
assertSecurityGroup
(
certificate_login
,
[
self
.
user_id
,
compute_node
.
getUserId
(),
software_instance
.
getUserId
()],
False
)
def
test_SlaveInstance_setSpecialise
(
self
):
slave_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Slave Instance'
)
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
instance_tree
=
self
.
portal
.
instance_tree_module
.
newContent
(
portal_type
=
'Instance Tree'
,
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
slave_instance
.
edit
(
specialise
=
instance_tree
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
instance_tree
.
getReference
()],
False
)
def
test_SlaveInstance_setAggregate
(
self
):
instance_tree
=
self
.
portal
.
instance_tree_module
.
newContent
(
portal_type
=
'Instance Tree'
,
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
software_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
,
reference
=
'TESTSO-%s'
%
self
.
generateNewId
(),
specialise
=
instance_tree
.
getRelativeUrl
())
software_instance
.
validate
()
slave_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Slave Instance'
,
specialise
=
instance_tree
.
getRelativeUrl
())
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
instance_tree
.
getReference
()],
False
)
compute_node
=
self
.
portal
.
compute_node_module
.
template_compute_node
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
compute_node
.
edit
(
reference
=
'TESTC-%s'
%
self
.
generateNewId
())
partition
=
compute_node
.
newContent
(
portal_type
=
'Compute Partition'
)
software_instance
.
edit
(
aggregate
=
partition
.
getRelativeUrl
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
partition
,
'busy'
)
self
.
tic
()
slave_instance
.
edit
(
aggregate
=
partition
.
getRelativeUrl
())
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
software_instance
.
getUserId
(),
compute_node
.
getUserId
(),
instance_tree
.
getReference
()],
False
)
def
test_PaymentTransaction_setDestinationSection
(
self
):
self
.
_makePerson
()
payment_transaction
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Payment Transaction'
)
self
.
assertSecurityGroup
(
payment_transaction
,
[
self
.
user_id
,
'G-COMPANY'
,
'R-SHADOW-PERSON'
],
False
)
payment_transaction
.
edit
(
destination_section
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
payment_transaction
,
[
self
.
user_id
,
'G-COMPANY'
,
'SHADOW-%s'
%
self
.
person_user
.
getUserId
(),
self
.
person_user
.
getUserId
()],
False
)
def
test_PayzenEvent_setDestinationSection
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
system_event_module
.
newContent
(
portal_type
=
'Payzen Event'
)
self
.
assertSecurityGroup
(
event
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
event
.
edit
(
destination_section
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
self
.
user_id
,
'G-COMPANY'
,
'SHADOW-%s'
%
self
.
person_user
.
getUserId
()],
False
)
def
test_WechatEvent_setDestinationSection
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
system_event_module
.
newContent
(
portal_type
=
'Payzen Event'
)
self
.
assertSecurityGroup
(
event
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
event
.
edit
(
destination_section
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
self
.
user_id
,
'G-COMPANY'
,
'SHADOW-%s'
%
self
.
person_user
.
getUserId
()],
False
)
def
test_IntegrationSite_reindexObject
(
self
):
integration_site
=
self
.
portal
.
portal_integrations
.
newContent
(
...
...
@@ -379,285 +109,7 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self
.
assertEqual
(
comment
,
integration_site
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
test_SaleInvoiceTransaction_setDestinationSection
(
self
):
self
.
_makePerson
()
sale_invoice_transaction
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Sale Invoice Transaction'
)
self
.
assertSecurityGroup
(
sale_invoice_transaction
,
[
self
.
user_id
,
'G-COMPANY'
,
'R-SHADOW-PERSON'
],
False
)
sale_invoice_transaction
.
edit
(
destination_section
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
sale_invoice_transaction
,
[
self
.
user_id
,
'G-COMPANY'
,
self
.
person_user
.
getUserId
(),
'R-SHADOW-PERSON'
],
False
)
def
test_SupportRequest_setDestinationDecision
(
self
):
self
.
_makePerson
()
support_request
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
'Support Request'
)
self
.
assertSecurityGroup
(
support_request
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
support_request
.
edit
(
destination_decision
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
support_request
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_RegularisationRequest_setDestinationDecision
(
self
):
self
.
_makePerson
()
regularisation_request
=
self
.
portal
.
regularisation_request_module
.
newContent
(
portal_type
=
'Regularisation Request'
)
self
.
assertSecurityGroup
(
regularisation_request
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
regularisation_request
.
edit
(
destination_decision
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
regularisation_request
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_Acknowledgement_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Acknowledgement'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_Acknowledgement_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Acknowledgement'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_FaxMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Fax Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_FaxMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Fax Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_Letter_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Letter'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_Letter_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Letter'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_MailMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Mail Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_MailMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Mail Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_Note_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Note'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_Note_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Note'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_PhoneCall_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Phone Call'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_PhoneCall_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Phone Call'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_ShortMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Short Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_ShortMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Short Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_SiteMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Site Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_SiteMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Site Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_Visit_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Visit'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_Visit_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Visit'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_WebMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Web Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_WebMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Web Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
self
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_user_id
],
False
)
def
test_SalePackingList_setSpecialise
(
self
):
self
.
_makePerson
()
...
...
@@ -892,4 +344,4 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
project
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
upgrade_decision
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
()],
False
)
\ No newline at end of file
project
.
getReference
()],
False
)
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interaction_ComputeNode_edit.xml
View file @
ab4024f6
...
...
@@ -35,6 +35,7 @@
<string>
Compute Node
</string>
<string>
Instance Node
</string>
<string>
Remote Node
</string>
<string>
Computer Model
</string>
</tuple>
</value>
</item>
...
...
@@ -54,10 +55,6 @@
<tuple>
<string>
_setUserId.*
</string>
<string>
_setFollowUp.*
</string>
<string>
_setAllocationScope.*
</string>
<string>
_setDestinationSection.*
</string>
<string>
validate
</string>
<string>
invalidate
</string>
</tuple>
</value>
</item>
...
...
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interaction_SaleInvoiceTransaction_edit.xml
View file @
ab4024f6
...
...
@@ -33,6 +33,9 @@
<value>
<tuple>
<string>
Sale Invoice Transaction
</string>
<string>
Accounting Transaction
</string>
<string>
Balance Transaction
</string>
<string>
Purchase Invoice Transaction
</string>
</tuple>
</value>
</item>
...
...
@@ -51,6 +54,7 @@
<value>
<tuple>
<string>
_setDestinationSection.*
</string>
<string>
_setLedger.*
</string>
</tuple>
</value>
</item>
...
...
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interaction_SupportRequest_edit.xml
View file @
ab4024f6
...
...
@@ -33,6 +33,8 @@
<value>
<tuple>
<string>
Support Request
</string>
<string>
Upgrade Decision
</string>
<string>
Regularisation Request
</string>
</tuple>
</value>
</item>
...
...
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
View file @
ab4024f6
Accounting Transaction | local_permission_slapos_interaction_workflow
Acknowledgement | local_permission_slapos_interaction_workflow
Allocation Supply | local_permission_slapos_interaction_workflow
Balance Transaction | local_permission_slapos_interaction_workflow
Cloud Contract | local_permission_slapos_interaction_workflow
Compute Node | local_permission_slapos_interaction_workflow
Compute Node | slapos_erp5_interaction_workflow
...
...
@@ -26,9 +28,11 @@ Payment Transaction | local_permission_slapos_interaction_workflow
Payzen Event | local_permission_slapos_interaction_workflow
Person | local_permission_slapos_interaction_workflow
Project | local_permission_slapos_interaction_workflow
Purchase Invoice Transaction | local_permission_slapos_interaction_workflow
Purchase Packing List Cell | -immobilisation_movement_interaction_workflow
Purchase Packing List Line | -immobilisation_movement_interaction_workflow
Purchase Packing List | -immobilisation_movement_interaction_workflow
Regularisation Request | local_permission_slapos_interaction_workflow
Remote Node | local_permission_slapos_interaction_workflow
Restricted Access Token | local_permission_slapos_interaction_workflow
Sale Invoice Transaction | local_permission_slapos_interaction_workflow
...
...
@@ -42,5 +46,6 @@ Software Installation | local_permission_slapos_interaction_workflow
Software Instance | local_permission_slapos_interaction_workflow
Software Product | local_permission_slapos_interaction_workflow
Support Request | local_permission_slapos_interaction_workflow
Upgrade Decision | local_permission_slapos_interaction_workflow
Web Message | local_permission_slapos_interaction_workflow
Wechat Event | 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