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
Nicolas Wavrant
slapos.core
Commits
b540b7ab
Commit
b540b7ab
authored
Nov 12, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate service security
parent
451f9b56
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
50 additions
and
51 deletions
+50
-51
master/bt5/slapos_erp5/LocalRolesTemplateItem/service_module.xml
...bt5/slapos_erp5/LocalRolesTemplateItem/service_module.xml
+11
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Service%20Module.xml
...pos_erp5/PortalTypeRolesTemplateItem/Service%20Module.xml
+7
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Service.xml
...r/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Service.xml
+7
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
..._erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
+18
-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_local_roles_list
master/bt5/slapos_erp5/bt/template_local_roles_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
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
+2
-0
master/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Service%20Module.xml
...fib_erp5/PortalTypeRolesTemplateItem/Service%20Module.xml
+0
-22
master/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Service.xml
...er/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Service.xml
+0
-22
master/bt5/vifib_erp5/bt/revision
master/bt5/vifib_erp5/bt/revision
+1
-1
master/bt5/vifib_erp5/bt/template_local_role_list
master/bt5/vifib_erp5/bt/template_local_role_list
+0
-1
master/bt5/vifib_erp5/bt/template_local_roles_list
master/bt5/vifib_erp5/bt/template_local_roles_list
+0
-1
master/bt5/vifib_erp5/bt/template_portal_type_role_list
master/bt5/vifib_erp5/bt/template_portal_type_role_list
+0
-2
master/bt5/vifib_erp5/bt/template_portal_type_roles_list
master/bt5/vifib_erp5/bt/template_portal_type_roles_list
+0
-2
No files found.
master/bt5/
vifib
_erp5/LocalRolesTemplateItem/service_module.xml
→
master/bt5/
slapos
_erp5/LocalRolesTemplateItem/service_module.xml
View file @
b540b7ab
...
@@ -4,15 +4,6 @@
...
@@ -4,15 +4,6 @@
<item>
Auditor
</item>
<item>
Auditor
</item>
<item>
Author
</item>
<item>
Author
</item>
</role>
</role>
<role
id=
'R-COMPUTER'
>
<item>
Auditor
</item>
</role>
<role
id=
'R-INSTANCE'
>
<item>
Auditor
</item>
</role>
<role
id=
'R-MEMBER'
>
<item>
Auditor
</item>
</role>
<role
id=
'admin'
>
<role
id=
'admin'
>
<item>
Owner
</item>
<item>
Owner
</item>
</role>
</role>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Service%20Module.xml
0 → 100644
View file @
b540b7ab
<type_roles>
<role
id=
'Author; Auditor'
>
<property
id=
'title'
>
Group company
</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/Service.xml
0 → 100644
View file @
b540b7ab
<type_roles>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</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/testSlapOSERP5GroupRoleSecurity.py
View file @
b540b7ab
...
@@ -862,3 +862,21 @@ class TestSaleInvoiceTransaction(TestSlapOSGroupRoleSecurityMixin):
...
@@ -862,3 +862,21 @@ class TestSaleInvoiceTransaction(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestServiceModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
service_module
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'admin'
],
True
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'admin'
,
[
'Owner'
])
class
TestService
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
service_module
.
newContent
(
portal_type
=
'Service'
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
master/bt5/slapos_erp5/bt/template_local_role_list
View file @
b540b7ab
...
@@ -13,6 +13,7 @@ person_module
...
@@ -13,6 +13,7 @@ person_module
portal_contributions
portal_contributions
sale_order_module
sale_order_module
sale_packing_list_module
sale_packing_list_module
service_module
software_installation_module
software_installation_module
software_instance_module
software_instance_module
software_product_module
software_product_module
...
...
master/bt5/slapos_erp5/bt/template_local_roles_list
View file @
b540b7ab
...
@@ -13,6 +13,7 @@ person_module
...
@@ -13,6 +13,7 @@ person_module
portal_contributions
portal_contributions
sale_order_module
sale_order_module
sale_packing_list_module
sale_packing_list_module
service_module
software_installation_module
software_installation_module
software_instance_module
software_instance_module
software_product_module
software_product_module
...
...
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
b540b7ab
...
@@ -35,6 +35,8 @@ Sale Order
...
@@ -35,6 +35,8 @@ Sale Order
Sale Order Module
Sale Order Module
Sale Packing List
Sale Packing List
Sale Packing List Module
Sale Packing List Module
Service
Service Module
Slave Instance
Slave Instance
Software Installation
Software Installation
Software Installation Module
Software Installation Module
...
...
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
View file @
b540b7ab
...
@@ -35,6 +35,8 @@ Sale Order
...
@@ -35,6 +35,8 @@ Sale Order
Sale Order Module
Sale Order Module
Sale Packing List
Sale Packing List
Sale Packing List Module
Sale Packing List Module
Service
Service Module
Slave Instance
Slave Instance
Software Installation
Software Installation
Software Installation Module
Software Installation Module
...
...
master/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Service%20Module.xml
deleted
100644 → 0
View file @
451f9b56
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Computer
</property>
<multi_property
id=
'category'
>
role/computer
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
<role
id=
'Author; Auditor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Instance
</property>
<multi_property
id=
'category'
>
role/instance
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/vifib_erp5/PortalTypeRolesTemplateItem/Service.xml
deleted
100644 → 0
View file @
451f9b56
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Computer
</property>
<multi_property
id=
'category'
>
role/computer
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Instance
</property>
<multi_property
id=
'category'
>
role/instance
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
</type_roles>
\ No newline at end of file
master/bt5/vifib_erp5/bt/revision
View file @
b540b7ab
560
561
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_erp5/bt/template_local_role_list
View file @
b540b7ab
...
@@ -55,7 +55,6 @@ query_module
...
@@ -55,7 +55,6 @@ query_module
sale_opportunity_module
sale_opportunity_module
sale_trade_condition_module
sale_trade_condition_module
sale_trade_condition_module/vifib_trade_condition
sale_trade_condition_module/vifib_trade_condition
service_module
service_module/computer_registration
service_module/computer_registration
service_module/vifib_discount
service_module/vifib_discount
service_module/vifib_registration
service_module/vifib_registration
...
...
master/bt5/vifib_erp5/bt/template_local_roles_list
View file @
b540b7ab
...
@@ -55,7 +55,6 @@ query_module
...
@@ -55,7 +55,6 @@ query_module
sale_opportunity_module
sale_opportunity_module
sale_trade_condition_module
sale_trade_condition_module
sale_trade_condition_module/vifib_trade_condition
sale_trade_condition_module/vifib_trade_condition
service_module
service_module/computer_registration
service_module/computer_registration
service_module/vifib_discount
service_module/vifib_discount
service_module/vifib_registration
service_module/vifib_registration
...
...
master/bt5/vifib_erp5/bt/template_portal_type_role_list
View file @
b540b7ab
...
@@ -50,8 +50,6 @@ Sale Opportunity
...
@@ -50,8 +50,6 @@ Sale Opportunity
Sale Opportunity Module
Sale Opportunity Module
Sale Trade Condition
Sale Trade Condition
Sale Trade Condition Module
Sale Trade Condition Module
Service
Service Module
Short Message
Short Message
Site Message
Site Message
Support Request
Support Request
...
...
master/bt5/vifib_erp5/bt/template_portal_type_roles_list
View file @
b540b7ab
...
@@ -50,8 +50,6 @@ Sale Opportunity
...
@@ -50,8 +50,6 @@ Sale Opportunity
Sale Opportunity Module
Sale Opportunity Module
Sale Trade Condition
Sale Trade Condition
Sale Trade Condition Module
Sale Trade Condition Module
Service
Service Module
Short Message
Short Message
Site Message
Site Message
Support Request
Support Request
...
...
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