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
Labels
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
6a331abc
Commit
6a331abc
authored
Oct 11, 2023
by
Rafael Monnerat
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: Allow Administrator/Accountant access document module and PDF
parent
749007b0
Pipeline
#30417
failed with stage
in 0 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
0 deletions
+43
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/document_module.xml
...t5/slapos_erp5/LocalRolesTemplateItem/document_module.xml
+4
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Document%20Module.xml
...os_erp5/PortalTypeRolesTemplateItem/Document%20Module.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/PDF.xml
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/PDF.xml
+8
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+20
-0
master/bt5/slapos_erp5/bt/template_local_role_list
master/bt5/slapos_erp5/bt/template_local_role_list
+1
-0
master/bt5/slapos_erp5/bt/template_portal_type_role_list
master/bt5/slapos_erp5/bt/template_portal_type_role_list
+2
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/document_module.xml
0 → 100644
View file @
6a331abc
<local_roles_item>
Romain Courteaud
@romain
·
Jan 03, 2024
Owner
@rafael
it seems you forgot to export the module local_roles.
@rafael it seems you forgot to export the module local_roles.
Please
register
or
sign in
to reply
<local_roles>
</local_roles>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Document%20Module.xml
0 → 100644
View file @
6a331abc
<type_roles>
<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>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/PDF.xml
0 → 100644
View file @
6a331abc
<type_roles>
<role
id=
'Assignor'
>
<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>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
6a331abc
...
...
@@ -2403,6 +2403,26 @@ class TestUserConsumptionHTMLFile(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
html_document
,
customer
.
getUserId
(),
[
'Assignee'
])
self
.
assertRoles
(
html_document
,
self
.
user_id
,
[
'Owner'
])
class
TestDocumentModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
document_module
self
.
changeOwnership
(
module
)
self
.
assertSecurityGroup
(
module
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Author'
,
'Auditor'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestPDF
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
text
=
self
.
portal
.
document_module
.
newContent
(
portal_type
=
'PDF'
)
self
.
assertSecurityGroup
(
text
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
text
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
text
,
self
.
user_id
,
[
'Owner'
])
class
TestCloudContractModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
cloud_contract_module
...
...
master/bt5/slapos_erp5/bt/template_local_role_list
View file @
6a331abc
...
...
@@ -43,6 +43,7 @@ data_stream_module
data_supply_module
data_transformation_module
document_ingestion_module
document_module
event_module
event_module/slapos_crm_web_message_template
incident_response_module
...
...
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
6a331abc
...
...
@@ -48,6 +48,7 @@ Data Supply Module
Data Transformation
Data Transformation Module
Document Ingestion Module
Document Module
ERP5 Login
Event Module
Facebook Login
...
...
@@ -70,6 +71,7 @@ Open Sale Order
Open Sale Order Module
Organisation
Organisation Module
PDF
Payment Transaction
Payzen Event
Person
...
...
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