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
c9899abe
Commit
c9899abe
authored
Nov 06, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: only provide Author access to computer on Consumption Document Module
parent
fbd6e4ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
28 deletions
+9
-28
master/bt5/slapos_erp5/LocalRolesTemplateItem/consumption_document_module.xml
...p5/LocalRolesTemplateItem/consumption_document_module.xml
+0
-16
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Consumption%20Document%20Module.xml
...TypeRolesTemplateItem/Consumption%20Document%20Module.xml
+0
-12
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+9
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/consumption_document_module.xml
View file @
c9899abe
<local_roles_item>
<local_roles>
<role
id=
'G-COMPANY'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
<role
id=
'R-COMPUTER'
>
<item>
Author
</item>
</role>
<role
id=
'R-MEMBER'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id
id=
'computer'
>
<principal
id=
'R-COMPUTER'
>
Author
</principal>
</local_role_group_id>
<local_role_group_id
id=
'group'
>
<principal
id=
'G-COMPANY'
>
Auditor
</principal>
<principal
id=
'G-COMPANY'
>
Author
</principal>
</local_role_group_id>
<local_role_group_id
id=
'user'
>
<principal
id=
'R-MEMBER'
>
Auditor
</principal>
<principal
id=
'R-MEMBER'
>
Author
</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Consumption%20Document%20Module.xml
View file @
c9899abe
...
...
@@ -5,16 +5,4 @@
<multi_property
id=
'category'
>
role/computer
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
<role
id=
'Author; Auditor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'categories'
>
local_role_group/group
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
<role
id=
'Auditor; Author'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'categories'
>
local_role_group/user
</multi_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_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
c9899abe
...
...
@@ -2000,3 +2000,12 @@ class TestRestrictedAccessToken(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
delivery
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
delivery
,
person
.
getUserId
(),
[
'Auditor'
])
class
TestConsumptionDocumentModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_ConsumptionDocumentModule
(
self
):
module
=
self
.
portal
.
consumption_document_module
self
.
assertSecurityGroup
(
module
,
[
'R-COMPUTER'
,
module
.
Base_getOwnerId
()],
False
)
self
.
assertRoles
(
module
,
'R-COMPUTER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
module
.
Base_getOwnerId
(),
[
'Owner'
])
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