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
c19634b1
Commit
c19634b1
authored
May 27, 2024
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: Sale user can see Software Product
parent
37f71599
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Software%20Product.xml
...s_erp5/PortalTypeRolesTemplateItem/Software%20Product.xml
+6
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+4
-1
No files found.
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Software%20Product.xml
View file @
c19634b1
...
...
@@ -26,4 +26,10 @@
<multi_property
id=
'category'
>
function/production/manager
</multi_property>
<multi_property
id=
'base_category'
>
follow_up
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Sale
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</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 @
c19634b1
...
...
@@ -988,8 +988,9 @@ class TestSoftwareProduct(TestSlapOSGroupRoleSecurityMixin):
product
=
self
.
portal
.
software_product_module
.
newContent
(
portal_type
=
'Software Product'
)
self
.
assertSecurityGroup
(
product
,
[
self
.
user_id
],
False
)
[
self
.
user_id
,
'F-SALE*'
],
False
)
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
'F-SALE*'
,
[
'Auditor'
])
def
test_SoftwareProduct_Project
(
self
):
project
=
self
.
addProject
()
...
...
@@ -998,10 +999,12 @@ class TestSoftwareProduct(TestSlapOSGroupRoleSecurityMixin):
product
.
edit
(
follow_up_value
=
project
)
self
.
assertSecurityGroup
(
product
,
[
self
.
user_id
,
'F-SALE*'
,
'%s_F-CUSTOMER'
%
project
.
getReference
(),
'%s_F-PRODAGNT'
%
project
.
getReference
(),
'%s_F-PRODMAN'
%
project
.
getReference
()],
False
)
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
'F-SALE*'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'%s_F-PRODMAN'
%
project
.
getReference
(),
[
'Assignor'
])
self
.
assertRoles
(
product
,
'%s_F-PRODAGNT'
%
project
.
getReference
(),
[
'Assignee'
])
self
.
assertRoles
(
product
,
'%s_F-CUSTOMER'
%
project
.
getReference
(),
[
'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