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
93682b4a
Commit
93682b4a
authored
Oct 30, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: nobody have to access Hosting Subscription for now
parent
9733b409
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
38 deletions
+17
-38
master/bt5/slapos_erp5/LocalRolesTemplateItem/hosting_subscription_module.xml
...p5/LocalRolesTemplateItem/hosting_subscription_module.xml
+0
-11
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription%20Module.xml
...TypeRolesTemplateItem/Hosting%20Subscription%20Module.xml
+0
-11
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription.xml
...p5/PortalTypeRolesTemplateItem/Hosting%20Subscription.xml
+0
-16
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+17
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/hosting_subscription_module.xml
View file @
93682b4a
<local_roles_item>
<local_roles_item>
<local_roles>
<local_roles>
<role
id=
'F-CUSTOMER'
>
<item>
Auditor
</item>
</role>
<role
id=
'F-PRODUCTION*'
>
<item>
Auditor
</item>
</role>
</local_roles>
</local_roles>
<local_role_group_ids>
<local_role_group_id
id=
'function'
>
<principal
id=
'F-CUSTOMER'
>
Auditor
</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription%20Module.xml
View file @
93682b4a
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'categories'
>
local_role_group/function
</multi_property>
<multi_property
id=
'category'
>
function/customer
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Production
</property>
<multi_property
id=
'category'
>
function/production*
</multi_property>
<multi_property
id=
'base_category'
>
function
</multi_property>
</role>
</type_roles>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Hosting%20Subscription.xml
View file @
93682b4a
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Project Production Agent
</property>
<property
id=
'description'
>
XXX add local role group
</property>
<property
id=
'condition'
>
python: context.getFollowUp("") != ""
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'category'
>
function/production/agent
</multi_property>
<multi_property
id=
'base_category'
>
follow_up
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Project Production Manager
</property>
<property
id=
'description'
>
XXX add local role group
</property>
<property
id=
'condition'
>
python: context.getFollowUp("") != ""
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'category'
>
function/production/manager
</multi_property>
<multi_property
id=
'base_category'
>
follow_up
</multi_property>
</role>
</type_roles>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
93682b4a
...
@@ -1355,3 +1355,20 @@ class TestProject(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1355,3 +1355,20 @@ class TestProject(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
project
,
'F-ACCOUNTING*'
,
[
'Auditor'
])
self
.
assertRoles
(
project
,
'F-ACCOUNTING*'
,
[
'Auditor'
])
self
.
assertRoles
(
project
,
project
.
getReference
(),
[
'Auditor'
])
self
.
assertRoles
(
project
,
project
.
getReference
(),
[
'Auditor'
])
class
TestHostingSubscriptionModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_HostingSubscriptionModule
(
self
):
module
=
self
.
portal
.
hosting_subscription_module
self
.
assertSecurityGroup
(
module
,
[
module
.
Base_getOwnerId
()],
False
)
self
.
assertRoles
(
module
,
module
.
Base_getOwnerId
(),
[
'Owner'
])
class
TestHostingSubscription
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_HostingSubscription_default
(
self
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
.
newContent
(
portal_type
=
'Hosting Subscription'
)
self
.
assertSecurityGroup
(
hosting_subscription
,
[
self
.
user_id
],
False
)
self
.
assertRoles
(
hosting_subscription
,
self
.
user_id
,
[
'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