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
Thomas Gambier
slapos.core
Commits
0842ca52
Commit
0842ca52
authored
Sep 03, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: Accountant can view assignment as Auditor
parent
992b58ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Assignment.xml
...t5/slapos_erp5/PortalTypeRolesTemplateItem/Assignment.xml
+12
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+4
-4
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Assignment.xml
View file @
0842ca52
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Accountant Agent
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/accounting/agent
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Accountant Manager
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/accounting/manager
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
<role
id=
'Assignee'
>
<property
id=
'title'
>
Sale Agent
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
0842ca52
...
...
@@ -385,18 +385,18 @@ class TestAllocationSupply(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
supply
,
'%s_F-PRODMAN'
%
project
.
getReference
(),
[
'Assignor'
])
self
.
assertRoles
(
supply
,
'%s_F-PRODAGNT'
%
project
.
getReference
(),
[
'Assignee'
])
class
TestAssignment
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_Assignment_Sale
(
self
):
def
test_Assignment_Sale
_Accountant
(
self
):
assignment
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
).
newContent
(
portal_type
=
'Assignment'
)
self
.
assertSecurityGroup
(
assignment
,
[
self
.
user_id
,
'F-SALEAGT'
,
'F-SALEMAN'
],
False
)
[
self
.
user_id
,
'F-SALEAGT'
,
'F-SALEMAN'
,
'F-ACCMAN'
,
'F-ACCAGT'
],
False
)
self
.
assertRoles
(
assignment
,
'F-ACCMAN'
,
[
'Auditor'
])
self
.
assertRoles
(
assignment
,
'F-ACCAGT'
,
[
'Auditor'
])
self
.
assertRoles
(
assignment
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
assignment
,
'F-SALEMAN'
,
[
'Assignor'
])
self
.
assertRoles
(
assignment
,
'F-SALEAGT'
,
[
'Assignee'
])
class
TestComputeNodeModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_ComputeNodeModule
(
self
):
module
=
self
.
portal
.
compute_node_module
...
...
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