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
Boxiang Sun
slapos.core
Commits
e4c91327
Commit
e4c91327
authored
Mar 16, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: Allow Administrator access Subscription Request and Instance Response
parent
1f049470
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
106 additions
and
0 deletions
+106
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/incident_response_module.xml
..._erp5/LocalRolesTemplateItem/incident_response_module.xml
+14
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/subscription_request_module.xml
...p5/LocalRolesTemplateItem/subscription_request_module.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Incident%20Response%20Module.xml
...talTypeRolesTemplateItem/Incident%20Response%20Module.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Incident%20Response.xml
..._erp5/PortalTypeRolesTemplateItem/Incident%20Response.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Subscription%20Request%20Module.xml
...TypeRolesTemplateItem/Subscription%20Request%20Module.xml
+8
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Subscription%20Request.xml
...p5/PortalTypeRolesTemplateItem/Subscription%20Request.xml
+8
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+40
-0
master/bt5/slapos_erp5/bt/template_local_role_list
master/bt5/slapos_erp5/bt/template_local_role_list
+2
-0
master/bt5/slapos_erp5/bt/template_portal_type_role_list
master/bt5/slapos_erp5/bt/template_portal_type_role_list
+4
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/incident_response_module.xml
0 → 100644
View file @
e4c91327
<local_roles_item>
<local_roles>
<role
id=
'G-COMPANY'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
</local_roles>
<local_role_group_ids>
<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_ids>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/LocalRolesTemplateItem/subscription_request_module.xml
0 → 100644
View file @
e4c91327
<local_roles_item>
<local_roles>
<role
id=
'G-COMPANY'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
</local_roles>
<local_role_group_ids>
<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_ids>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Incident%20Response%20Module.xml
0 → 100644
View file @
e4c91327
<type_roles>
<role
id=
'Auditor; Author'
>
<property
id=
'title'
>
Company group
</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/Incident%20Response.xml
0 → 100644
View file @
e4c91327
<type_roles>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Company group
</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/Subscription%20Request%20Module.xml
0 → 100644
View file @
e4c91327
<type_roles>
<role
id=
'Auditor; Author'
>
<property
id=
'title'
>
Company group
</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/Subscription%20Request.xml
0 → 100644
View file @
e4c91327
<type_roles>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Company group
</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 @
e4c91327
...
...
@@ -1294,6 +1294,44 @@ class TestCampaign(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestIncidentResponseModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
incident_response_module
self
.
changeOwnership
(
module
)
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestIncidentResponse
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
incident_response
=
self
.
portal
.
incident_response_module
.
newContent
(
portal_type
=
'Incident Response'
)
incident_response
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
incident_response
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
incident_response
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
incident_response
,
self
.
user_id
,
[
'Owner'
])
class
TestSubscriptionRequestModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
subscription_request_module
self
.
changeOwnership
(
module
)
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestSubscriptionRequest
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
subscription_request
=
self
.
portal
.
subscription_request_module
.
newContent
(
portal_type
=
'Subscription Request'
)
subscription_request
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
subscription_request
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
subscription_request
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
subscription_request
,
self
.
user_id
,
[
'Owner'
])
class
TestCashRegister
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
organisation_module
.
newContent
(
...
...
@@ -2290,6 +2328,8 @@ class TestCloudContractModule(TestSlapOSGroupRoleSecurityMixin):
self
.
assertSecurityGroup
(
module
,
[
self
.
user_id
,
'G-COMPANY'
,
'R-MEMBER'
,
'R-SHADOW-PERSON'
],
False
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Author'
,
'Auditor'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestCloudContract
(
TestSlapOSGroupRoleSecurityMixin
):
...
...
master/bt5/slapos_erp5/bt/template_local_role_list
View file @
e4c91327
...
...
@@ -41,6 +41,7 @@ event_module
event_module/slapos_crm_web_message_template
hosting_subscription_module
image_module
incident_response_module
inventory_module
invitation_token_module
knowledge_pad_module
...
...
@@ -97,6 +98,7 @@ software_installation_module
software_instance_module
software_product_module
software_release_module
subscription_request_module
support_request_module
support_request_module/slapos_crm_support_request_template
system_event_module
...
...
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
e4c91327
...
...
@@ -50,6 +50,8 @@ Hosting Subscription
Hosting Subscription Module
Image
Image Module
Incident Response
Incident Response Module
Integration Site
Integration Tool
Inventory
...
...
@@ -114,6 +116,8 @@ Software Product Module
Software Release
Software Release Module
Spreadsheet
Subscription Request
Subscription Request Module
Support Request
Support Request Module
System Event 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