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
Lu Xu
slapos.core
Commits
b87c6970
Commit
b87c6970
authored
Dec 10, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give shadow user access to payzen event.
parent
880a0298
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
166 additions
and
14 deletions
+166
-14
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Payzen%20Event.xml
...lapos_erp5/PortalTypeRolesTemplateItem/Payzen%20Event.xml
+13
-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
+27
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
...testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
+16
-0
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interactions/PayzenEvent_edit.xml
...os_interaction_workflow/interactions/PayzenEvent_edit.xml
+96
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
master/bt5/slapos_erp5/bt/template_portal_type_role_list
master/bt5/slapos_erp5/bt/template_portal_type_role_list
+1
-0
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
+1
-0
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
...5/slapos_erp5/bt/template_portal_type_workflow_chain_list
+1
-0
master/bt5/slapos_incubation/PortalTypeRolesTemplateItem/Payzen%20Event.xml
...incubation/PortalTypeRolesTemplateItem/Payzen%20Event.xml
+0
-7
master/bt5/slapos_incubation/bt/revision
master/bt5/slapos_incubation/bt/revision
+1
-1
master/bt5/slapos_incubation/bt/template_portal_type_role_list
...r/bt5/slapos_incubation/bt/template_portal_type_role_list
+1
-2
master/bt5/slapos_incubation/bt/template_portal_type_roles_list
.../bt5/slapos_incubation/bt/template_portal_type_roles_list
+1
-2
master/bt5/slapos_payzen/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
...PortalTypeBaseCategoryTemplateItem/base_category_list.xml
+1
-0
master/bt5/slapos_payzen/bt/revision
master/bt5/slapos_payzen/bt/revision
+1
-1
master/bt5/slapos_payzen/bt/template_portal_type_base_category_list
.../slapos_payzen/bt/template_portal_type_base_category_list
+1
-0
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Payzen%20Event.xml
0 → 100644
View file @
b87c6970
<type_roles>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Shadow User
</property>
<property
id=
'condition'
>
python: here.getDestinationSection('', portal_type='Person') != ''
</property>
<property
id=
'base_category_script'
>
PaymentTransactionType_getSecurityCategoryFromUser
</property>
<multi_property
id=
'base_category'
>
aggregate
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
b87c6970
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
<type>
Payment Transaction
</type>
<type>
Payment Transaction
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Payzen Event
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<chain>
<type>
Person
</type>
<type>
Person
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
...
...
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
View file @
b87c6970
...
@@ -1417,3 +1417,30 @@ class TestSystemEventModule(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1417,3 +1417,30 @@ class TestSystemEventModule(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
module
,
'R-SHADOW-PERSON'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'R-SHADOW-PERSON'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'ERP5TypeTestCase'
,
[
'Owner'
])
self
.
assertRoles
(
module
,
'ERP5TypeTestCase'
,
[
'Owner'
])
class
TestPayzenEvent
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
system_event_module
.
newContent
(
portal_type
=
'Payzen Event'
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
def
test_ShadowUser
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
system_event_module
.
newContent
(
portal_type
=
'Payzen Event'
)
product
.
edit
(
destination_section_value
=
person
,
)
product
.
updateLocalRolesOnSecurityGroups
()
shadow_reference
=
'SHADOW-%s'
%
reference
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
,
shadow_reference
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
shadow_reference
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
View file @
b87c6970
...
@@ -277,3 +277,19 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
...
@@ -277,3 +277,19 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self
.
assertSecurityGroup
(
payment_transaction
,
[
self
.
user_id
,
self
.
assertSecurityGroup
(
payment_transaction
,
[
self
.
user_id
,
'G-COMPANY'
,
'SHADOW-%s'
%
self
.
person_user
.
getReference
()],
'G-COMPANY'
,
'SHADOW-%s'
%
self
.
person_user
.
getReference
()],
False
)
False
)
def
test_PayzenEvent_setDestinationSection
(
self
):
self
.
_makePerson
()
payment_transaction
=
self
.
portal
.
system_event_module
.
newContent
(
portal_type
=
'Payzen Event'
)
self
.
assertSecurityGroup
(
payment_transaction
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
payment_transaction
.
edit
(
destination_section
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
payment_transaction
,
[
self
.
user_id
,
'G-COMPANY'
,
'SHADOW-%s'
%
self
.
person_user
.
getReference
()],
False
)
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interactions/PayzenEvent_edit.xml
0 → 100644
View file @
b87c6970
<?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>
PayzenEvent_edit
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
_setDestinationSection.*
</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>
Payzen Event
</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 @
b87c6970
132
133
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
b87c6970
...
@@ -58,6 +58,7 @@ Organisation
...
@@ -58,6 +58,7 @@ Organisation
Organisation Module
Organisation Module
PDF
PDF
Payment Transaction
Payment Transaction
Payzen Event
Person
Person
Person Module
Person Module
Phone Call
Phone Call
...
...
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
View file @
b87c6970
Account
Account
Account Module
Account Module
Payzen Event
Accounting Period
Accounting Period
Accounting Transaction
Accounting Transaction
Accounting Transaction Module
Accounting Transaction Module
...
...
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
View file @
b87c6970
...
@@ -3,6 +3,7 @@ Computer Network | local_permission_slapos_interaction_workflow
...
@@ -3,6 +3,7 @@ Computer Network | local_permission_slapos_interaction_workflow
Computer | local_permission_slapos_interaction_workflow
Computer | local_permission_slapos_interaction_workflow
Hosting Subscription | local_permission_slapos_interaction_workflow
Hosting Subscription | local_permission_slapos_interaction_workflow
Payment Transaction | local_permission_slapos_interaction_workflow
Payment Transaction | local_permission_slapos_interaction_workflow
Payzen Event | local_permission_slapos_interaction_workflow
Person | local_permission_slapos_interaction_workflow
Person | 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
...
...
master/bt5/slapos_incubation/PortalTypeRolesTemplateItem/Payzen%20Event.xml
deleted
100644 → 0
View file @
880a0298
<type_roles>
<role
id=
'Author'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/slapos_incubation/bt/revision
View file @
b87c6970
9
10
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_incubation/bt/template_portal_type_role_list
View file @
b87c6970
Business Process
Business Process
Business Process Module
Business Process Module
Payzen Event
\ No newline at end of file
master/bt5/slapos_incubation/bt/template_portal_type_roles_list
View file @
b87c6970
Business Process
Business Process
Business Process Module
Business Process Module
Payzen Event
\ No newline at end of file
master/bt5/slapos_payzen/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
View file @
b87c6970
<base_category_list>
<base_category_list>
<portal_type
id=
"Payzen Event"
>
<portal_type
id=
"Payzen Event"
>
<item>
destination
</item>
<item>
destination
</item>
<item>
destination_section
</item>
<item>
source
</item>
<item>
source
</item>
</portal_type>
</portal_type>
<portal_type
id=
"Payzen Event Message"
>
<portal_type
id=
"Payzen Event Message"
>
...
...
master/bt5/slapos_payzen/bt/revision
View file @
b87c6970
91
92
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_payzen/bt/template_portal_type_base_category_list
View file @
b87c6970
Payzen Event Message | predecessor
Payzen Event Message | predecessor
Payzen Event | destination
Payzen Event | destination
Payzen Event | destination_section
Payzen Event | source
Payzen Event | source
\ 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