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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
33bd5105
Commit
33bd5105
authored
Oct 31, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: update Subscription Request local roles
parent
6c6bd9d3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
22 deletions
+38
-22
master/bt5/slapos_erp5/LocalRolesTemplateItem/subscription_request_module.xml
...p5/LocalRolesTemplateItem/subscription_request_module.xml
+0
-6
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Subscription%20Request%20Module.xml
...TypeRolesTemplateItem/Subscription%20Request%20Module.xml
+2
-8
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Subscription%20Request.xml
...p5/PortalTypeRolesTemplateItem/Subscription%20Request.xml
+1
-7
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+33
-0
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interaction_SubscriptionRequest_edit.xml
...raction_workflow/interaction_SubscriptionRequest_edit.xml
+2
-1
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/subscription_request_module.xml
View file @
33bd5105
...
...
@@ -2,10 +2,6 @@
<local_roles>
<role
id=
'F-CUSTOMER'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
<role
id=
'F-PRODUCTION*'
>
<item>
Auditor
</item>
</role>
<role
id=
'F-SALE*'
>
<item>
Auditor
</item>
...
...
@@ -15,8 +11,6 @@
<local_role_group_ids>
<local_role_group_id
id=
'function'
>
<principal
id=
'F-CUSTOMER'
>
Auditor
</principal>
<principal
id=
'F-CUSTOMER'
>
Author
</principal>
<principal
id=
'F-PRODUCTION*'
>
Auditor
</principal>
<principal
id=
'F-SALE*'
>
Auditor
</principal>
<principal
id=
'F-SALE*'
>
Author
</principal>
</local_role_group_id>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Subscription%20Request%20Module.xml
View file @
33bd5105
<type_roles>
<role
id=
'Au
thor; Au
ditor'
>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Member
</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=
'Auditor'
>
<property
id=
'title'
>
Production
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/production*
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
<role
id=
'Author; Auditor'
>
<role
id=
'Auditor; Author'
>
<property
id=
'title'
>
Sale
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/sale*
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Subscription%20Request.xml
View file @
33bd5105
...
...
@@ -10,13 +10,7 @@
<role
id=
'Auditor'
>
<property
id=
'title'
>
Sale Agent
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/sale/agent
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Sale Manager
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/sale/manager
</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
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
33bd5105
...
...
@@ -1560,3 +1560,36 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
delivery
,
'F-ACCOUNTING*'
,
[
'Auditor'
])
self
.
assertRoles
(
delivery
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
class
TestSubscriptionRequestModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_SubscriptionRequestModule
(
self
):
module
=
self
.
portal
.
subscription_request_module
self
.
assertSecurityGroup
(
module
,
[
'F-SALE*'
,
'F-CUSTOMER'
,
module
.
Base_getOwnerId
()],
False
)
self
.
assertRoles
(
module
,
'F-SALE*'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'F-CUSTOMER'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
module
.
Base_getOwnerId
(),
[
'Owner'
])
class
TestSubscriptionRequest
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_SubscriptionRequest_default
(
self
):
delivery
=
self
.
portal
.
subscription_request_module
.
newContent
(
portal_type
=
'Subscription Request'
)
self
.
assertSecurityGroup
(
delivery
,
[
'F-SALE*'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
delivery
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
delivery
,
'F-SALE*'
,
[
'Auditor'
])
def
test_SubscriptionRequest_user
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
delivery
=
self
.
portal
.
subscription_request_module
.
newContent
(
portal_type
=
'Subscription Request'
)
delivery
.
edit
(
destination_decision_value
=
person
,
ledger
=
"automated"
)
self
.
assertSecurityGroup
(
delivery
,
[
'F-SALE*'
,
self
.
user_id
,
person
.
getUserId
()],
False
)
self
.
assertRoles
(
delivery
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
delivery
,
'F-SALE*'
,
[
'Auditor'
])
self
.
assertRoles
(
delivery
,
person
.
getUserId
(),
[
'Associate'
])
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interaction_SubscriptionRequest_edit.xml
View file @
33bd5105
...
...
@@ -56,7 +56,8 @@
<key>
<string>
trigger_method_id
</string>
</key>
<value>
<tuple>
<string>
_setSource.*
</string>
<string>
_setDestinationDecision.*
</string>
<string>
_setLedger.*
</string>
</tuple>
</value>
</item>
...
...
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