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
af312de9
Commit
af312de9
authored
Mar 05, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure regularisation request security.
parent
025abe3a
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
129 additions
and
4 deletions
+129
-4
master/bt5/slapos_erp5/LocalRolesTemplateItem/regularisation_request_module.xml
.../LocalRolesTemplateItem/regularisation_request_module.xml
+14
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/regularisation_request_module/slapos_crm_regularisation_request_template.xml
...est_module/slapos_crm_regularisation_request_template.xml
+13
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Regularisation%20Request%20Module.xml
...peRolesTemplateItem/Regularisation%20Request%20Module.xml
+12
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Regularisation%20Request.xml
.../PortalTypeRolesTemplateItem/Regularisation%20Request.xml
+19
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
..._erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
+47
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
...testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
+12
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
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_local_roles_list
master/bt5/slapos_erp5/bt/template_local_roles_list
+5
-3
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
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/regularisation_request_module.xml
0 → 100644
View file @
af312de9
<local_roles_item>
<local_roles>
<role
id=
'G-COMPANY'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
<role
id=
'R-MEMBER'
>
<item>
Auditor
</item>
</role>
<role
id=
'zope'
>
<item>
Owner
</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/LocalRolesTemplateItem/regularisation_request_module/slapos_crm_regularisation_request_template.xml
0 → 100644
View file @
af312de9
<local_roles_item>
<local_roles>
<role
id=
'G-COMPANY'
>
<item>
Assignor
</item>
</role>
<role
id=
'R-MEMBER'
>
<item>
Auditor
</item>
</role>
<role
id=
'zope'
>
<item>
Owner
</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Regularisation%20Request%20Module.xml
0 → 100644
View file @
af312de9
<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>
<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/slapos_erp5/PortalTypeRolesTemplateItem/Regularisation%20Request.xml
0 → 100644
View file @
af312de9
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination_decision
</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'
>
Member can see template
</property>
<property
id=
'condition'
>
python: here.getRelativeUrl() == here.getPortalObject().portal_preferences.getPreferredRegularisationRequestTemplate()
</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/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
View file @
af312de9
...
...
@@ -1935,3 +1935,50 @@ class TestBusinessProcess(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
class
TestRegularisationRequestModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
regularisation_request_module
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'R-MEMBER'
,
'zope'
],
False
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestRegularisationRequest
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
regularisation_request_module
.
newContent
(
portal_type
=
'Regularisation Request'
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
def
test_Customer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
regularisation_request_module
.
newContent
(
portal_type
=
'Regularisation Request'
,
destination_decision_value
=
person
,
)
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
reference
,
self
.
user_id
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
reference
,
[
'Auditor'
])
self
.
assertRoles
(
product
,
self
.
user_id
,
[
'Owner'
])
def
test_Template
(
self
):
product
=
self
.
portal
.
restrictedTraverse
(
self
.
portal
.
portal_preferences
.
getPreferredRegularisationRequestTemplate
())
assert
product
.
getPortalType
()
==
'Regularisation Request'
product
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
product
,
[
'G-COMPANY'
,
product
.
Base_getOwnerId
(),
'R-MEMBER'
],
False
)
self
.
assertRoles
(
product
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
product
,
product
.
Base_getOwnerId
(),
[
'Owner'
])
self
.
assertRoles
(
product
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertPermissionsOfRole
(
product
,
'Auditor'
,
[
'Access contents information'
,
'View'
])
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
View file @
af312de9
...
...
@@ -349,6 +349,18 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self
.
assertSecurityGroup
(
support_request
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_RegularisationRequest_setDestinationDecision
(
self
):
self
.
_makePerson
()
regularisation_request
=
self
.
portal
.
regularisation_request_module
.
newContent
(
portal_type
=
'Regularisation Request'
)
self
.
assertSecurityGroup
(
regularisation_request
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
regularisation_request
.
edit
(
destination_decision
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
regularisation_request
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Acknowledgement_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
...
...
master/bt5/slapos_erp5/bt/revision
View file @
af312de9
163
\ No newline at end of file
164
\ No newline at end of file
master/bt5/slapos_erp5/bt/template_local_role_list
View file @
af312de9
...
...
@@ -47,6 +47,8 @@ product_module
purchase_order_module
purchase_trade_condition_module
query_module
regularisation_request_module
regularisation_request_module/slapos_crm_regularisation_request_template
sale_opportunity_module
sale_order_module
sale_packing_list_module
...
...
master/bt5/slapos_erp5/bt/template_local_roles_list
View file @
af312de9
...
...
@@ -27,6 +27,7 @@ data_set_module
document_ingestion_module
document_module
event_module
event_module/slapos_crm_web_message_template
hosting_subscription_module
image_module
inventory_module
...
...
@@ -46,6 +47,8 @@ product_module
purchase_order_module
purchase_trade_condition_module
query_module
regularisation_request_module
regularisation_request_module/slapos_crm_regularisation_request_template
sale_opportunity_module
sale_order_module
sale_packing_list_module
...
...
@@ -59,8 +62,7 @@ software_instance_module
software_product_module
software_release_module
support_request_module
support_request_module/slapos_crm_support_request_template
system_event_module
transformation_module
web_page_module
\ No newline at end of file
support_request_module/slapos_crm_support_request_template
event_module/slapos_crm_web_message_template
\ No newline at end of file
master/bt5/slapos_erp5/bt/template_portal_type_role_list
View file @
af312de9
...
...
@@ -74,6 +74,8 @@ Purchase Trade Condition
Purchase Trade Condition Module
Query
Query Module
Regularisation Request
Regularisation Request Module
Sale Invoice Transaction
Sale Opportunity
Sale Opportunity Module
...
...
master/bt5/slapos_erp5/bt/template_portal_type_roles_list
View file @
af312de9
...
...
@@ -74,6 +74,8 @@ Purchase Trade Condition
Purchase Trade Condition Module
Query
Query Module
Regularisation Request
Regularisation Request Module
Sale Invoice Transaction
Sale Opportunity
Sale Opportunity 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