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
6f678c50
Commit
6f678c50
authored
Nov 02, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: fix Business Process local roles
Accounting people can view the business process
parent
4b30e9a8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
0 deletions
+42
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/business_process_module.xml
...s_erp5/LocalRolesTemplateItem/business_process_module.xml
+4
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/business_process_module/slapos_ultimate_business_process.xml
...iness_process_module/slapos_ultimate_business_process.xml
+4
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Business%20Process%20Module.xml
...rtalTypeRolesTemplateItem/Business%20Process%20Module.xml
+6
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Business%20Process.xml
...s_erp5/PortalTypeRolesTemplateItem/Business%20Process.xml
+6
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+22
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/business_process_module.xml
View file @
6f678c50
<local_roles_item>
<local_roles>
<role
id=
'F-ACCOUNTING*'
>
<item>
Auditor
</item>
</role>
<role
id=
'F-SALE*'
>
<item>
Auditor
</item>
</role>
</local_roles>
<local_role_group_ids>
<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>
...
...
master/bt5/slapos_erp5/LocalRolesTemplateItem/business_process_module/slapos_ultimate_business_process.xml
View file @
6f678c50
<local_roles_item>
<local_roles>
<role
id=
'F-ACCOUNTING*'
>
<item>
Auditor
</item>
</role>
<role
id=
'F-SALE*'
>
<item>
Auditor
</item>
</role>
</local_roles>
<local_role_group_ids>
<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>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Business%20Process%20Module.xml
View file @
6f678c50
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Accounting
</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'
>
Sale
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Business%20Process.xml
View file @
6f678c50
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Accounting
</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'
>
Sale
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
6f678c50
...
...
@@ -1620,3 +1620,25 @@ class TestOrganisation(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
delivery
,
'F-SALEMAN'
,
[
'Assignor'
])
self
.
assertRoles
(
delivery
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
class
TestBusinessProcessModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_BusinessProcessModule
(
self
):
module
=
self
.
portal
.
business_process_module
self
.
assertSecurityGroup
(
module
,
[
'F-SALE*'
,
'F-ACCOUNTING*'
,
module
.
Base_getOwnerId
()],
False
)
self
.
assertRoles
(
module
,
'F-SALE*'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'F-ACCOUNTING*'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
module
.
Base_getOwnerId
(),
[
'Owner'
])
class
TestBusinessProcess
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_BusinessProcess_default
(
self
):
delivery
=
self
.
portal
.
business_process_module
.
newContent
(
portal_type
=
'Business Process'
)
self
.
assertSecurityGroup
(
delivery
,
[
'F-SALE*'
,
'F-ACCOUNTING*'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
delivery
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
delivery
,
'F-SALE*'
,
[
'Auditor'
])
self
.
assertRoles
(
delivery
,
'F-ACCOUNTING*'
,
[
'Auditor'
])
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