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
0
Merge Requests
0
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
Rafael Monnerat
slapos.core
Commits
7f23608b
Commit
7f23608b
authored
Jan 24, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give member access to its own events and tickets.
parent
b469825d
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
838 additions
and
3 deletions
+838
-3
master/bt5/slapos_erp5/LocalRolesTemplateItem/event_module.xml
...r/bt5/slapos_erp5/LocalRolesTemplateItem/event_module.xml
+4
-0
master/bt5/slapos_erp5/LocalRolesTemplateItem/support_request_module.xml
...os_erp5/LocalRolesTemplateItem/support_request_module.xml
+4
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Acknowledgement.xml
...apos_erp5/PortalTypeRolesTemplateItem/Acknowledgement.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Event%20Module.xml
...lapos_erp5/PortalTypeRolesTemplateItem/Event%20Module.xml
+5
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Fax%20Message.xml
...slapos_erp5/PortalTypeRolesTemplateItem/Fax%20Message.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Letter.xml
...er/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Letter.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Mail%20Message.xml
...lapos_erp5/PortalTypeRolesTemplateItem/Mail%20Message.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Note.xml
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Note.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Phone%20Call.xml
.../slapos_erp5/PortalTypeRolesTemplateItem/Phone%20Call.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Short%20Message.xml
...apos_erp5/PortalTypeRolesTemplateItem/Short%20Message.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Site%20Message.xml
...lapos_erp5/PortalTypeRolesTemplateItem/Site%20Message.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Support%20Request%20Module.xml
...ortalTypeRolesTemplateItem/Support%20Request%20Module.xml
+5
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Support%20Request.xml
...os_erp5/PortalTypeRolesTemplateItem/Support%20Request.xml
+6
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Visit.xml
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Visit.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Web%20Message.xml
...slapos_erp5/PortalTypeRolesTemplateItem/Web%20Message.xml
+14
-0
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+4
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
..._erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
+319
-2
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
...testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
+252
-0
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interactions/Event_edit.xml
...n_slapos_interaction_workflow/interactions/Event_edit.xml
+97
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
...5/slapos_erp5/bt/template_portal_type_workflow_chain_list
+1
-0
No files found.
master/bt5/slapos_erp5/LocalRolesTemplateItem/event_module.xml
View file @
7f23608b
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
<item>
Auditor
</item>
<item>
Auditor
</item>
<item>
Author
</item>
<item>
Author
</item>
</role>
</role>
<role
id=
'R-MEMBER'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
<role
id=
'zope'
>
<role
id=
'zope'
>
<item>
Owner
</item>
<item>
Owner
</item>
</role>
</role>
...
...
master/bt5/slapos_erp5/LocalRolesTemplateItem/support_request_module.xml
View file @
7f23608b
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
<item>
Auditor
</item>
<item>
Auditor
</item>
<item>
Author
</item>
<item>
Author
</item>
</role>
</role>
<role
id=
'R-MEMBER'
>
<item>
Auditor
</item>
<item>
Author
</item>
</role>
<role
id=
'zope'
>
<role
id=
'zope'
>
<item>
Owner
</item>
<item>
Owner
</item>
</role>
</role>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Acknowledgement.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Event%20Module.xml
View file @
7f23608b
...
@@ -4,4 +4,9 @@
...
@@ -4,4 +4,9 @@
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
</role>
<role
id=
'Auditor; Author'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
</type_roles>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Fax%20Message.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Letter.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Mail%20Message.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Note.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Phone%20Call.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Short%20Message.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Site%20Message.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Support%20Request%20Module.xml
View file @
7f23608b
...
@@ -4,4 +4,9 @@
...
@@ -4,4 +4,9 @@
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
<multi_property
id=
'base_category'
>
group
</multi_property>
</role>
</role>
<role
id=
'Auditor; Author'
>
<property
id=
'title'
>
Member
</property>
<multi_property
id=
'category'
>
role/member
</multi_property>
<multi_property
id=
'base_category'
>
role
</multi_property>
</role>
</type_roles>
</type_roles>
\ No newline at end of file
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Support%20Request.xml
View file @
7f23608b
<type_roles>
<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'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Visit.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeRolesTemplateItem/Web%20Message.xml
View file @
7f23608b
<type_roles>
<type_roles>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getDestinationValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
destination
</multi_property>
</role>
<role
id=
'Auditor'
>
<property
id=
'title'
>
Customer
</property>
<property
id=
'description'
>
Monovalued role
</property>
<property
id=
'condition'
>
python: here.getSourceValue(portal_type='Person') is not None
</property>
<property
id=
'base_category_script'
>
ERP5Type_getSecurityCategoryFromContent
</property>
<multi_property
id=
'base_category'
>
source
</multi_property>
</role>
<role
id=
'Assignor'
>
<role
id=
'Assignor'
>
<property
id=
'title'
>
Group company
</property>
<property
id=
'title'
>
Group company
</property>
<multi_property
id=
'category'
>
group/company
</multi_property>
<multi_property
id=
'category'
>
group/company
</multi_property>
...
...
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
7f23608b
<workflow_chain>
<workflow_chain>
<chain>
<type>
Acknowledgement
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<chain>
<type>
Computer
</type>
<type>
Computer
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
...
...
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5GroupRoleSecurity.py
View file @
7f23608b
...
@@ -1046,6 +1046,36 @@ class TestAcknowledgement(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1046,6 +1046,36 @@ class TestAcknowledgement(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Acknowledgement'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Acknowledgement'
,
destination_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'
])
class
TestBankAccount
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestBankAccount
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
organisation_module
.
newContent
(
product
=
self
.
portal
.
organisation_module
.
newContent
(
...
@@ -1127,8 +1157,9 @@ class TestEventModule(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1127,8 +1157,9 @@ class TestEventModule(TestSlapOSGroupRoleSecurityMixin):
def
test
(
self
):
def
test
(
self
):
module
=
self
.
portal
.
event_module
module
=
self
.
portal
.
event_module
self
.
assertSecurityGroup
(
module
,
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'zope'
],
True
)
[
'G-COMPANY'
,
'
R-MEMBER'
,
'
zope'
],
True
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestFaxMessage
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestFaxMessage
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -1141,6 +1172,36 @@ class TestFaxMessage(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1141,6 +1172,36 @@ class TestFaxMessage(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Fax Message'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Fax Message'
,
destination_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'
])
class
TestGadget
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestGadget
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
portal_gadgets
.
newContent
(
product
=
self
.
portal
.
portal_gadgets
.
newContent
(
...
@@ -1216,6 +1277,36 @@ class TestLetter(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1216,6 +1277,36 @@ class TestLetter(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Letter'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Letter'
,
destination_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'
])
class
TestMailMessage
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestMailMessage
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
event_module
.
newContent
(
product
=
self
.
portal
.
event_module
.
newContent
(
...
@@ -1226,6 +1317,36 @@ class TestMailMessage(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1226,6 +1317,36 @@ class TestMailMessage(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Mail Message'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Mail Message'
,
destination_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'
])
class
TestMeeting
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestMeeting
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
meeting_module
.
newContent
(
product
=
self
.
portal
.
meeting_module
.
newContent
(
...
@@ -1254,6 +1375,36 @@ class TestNote(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1254,6 +1375,36 @@ class TestNote(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Note'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Note'
,
destination_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'
])
class
TestPhoneCall
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestPhoneCall
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
event_module
.
newContent
(
product
=
self
.
portal
.
event_module
.
newContent
(
...
@@ -1264,6 +1415,36 @@ class TestPhoneCall(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1264,6 +1415,36 @@ class TestPhoneCall(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Phone Call'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Phone Call'
,
destination_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'
])
class
TestVisit
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestVisit
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
event_module
.
newContent
(
product
=
self
.
portal
.
event_module
.
newContent
(
...
@@ -1274,6 +1455,36 @@ class TestVisit(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1274,6 +1455,36 @@ class TestVisit(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Visit'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Visit'
,
destination_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'
])
class
TestNotificationMessageModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestNotificationMessageModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
module
=
self
.
portal
.
notification_message_module
module
=
self
.
portal
.
notification_message_module
...
@@ -1392,6 +1603,36 @@ class TestShortMessage(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1392,6 +1603,36 @@ class TestShortMessage(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Short Message'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Short Message'
,
destination_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'
])
class
TestSiteMessage
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestSiteMessage
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
event_module
.
newContent
(
product
=
self
.
portal
.
event_module
.
newContent
(
...
@@ -1402,6 +1643,36 @@ class TestSiteMessage(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1402,6 +1643,36 @@ class TestSiteMessage(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Site Message'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Site Message'
,
destination_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'
])
class
TestWebMessage
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestWebMessage
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
def
test_GroupCompany
(
self
):
product
=
self
.
portal
.
event_module
.
newContent
(
product
=
self
.
portal
.
event_module
.
newContent
(
...
@@ -1412,12 +1683,43 @@ class TestWebMessage(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1412,12 +1683,43 @@ class TestWebMessage(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'
])
def
test_SourceCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Web Message'
,
source_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_DestinationCustomer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Web Message'
,
destination_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'
])
class
TestSupportRequestModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestSupportRequestModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
module
=
self
.
portal
.
support_request_module
module
=
self
.
portal
.
support_request_module
self
.
assertSecurityGroup
(
module
,
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'zope'
],
True
)
[
'G-COMPANY'
,
'
R-MEMBER'
,
'
zope'
],
True
)
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestSupportRequest
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestSupportRequest
(
TestSlapOSGroupRoleSecurityMixin
):
...
@@ -1430,6 +1732,21 @@ class TestSupportRequest(TestSlapOSGroupRoleSecurityMixin):
...
@@ -1430,6 +1732,21 @@ class TestSupportRequest(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'
])
def
test_Customer
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
product
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
'Support 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'
])
class
TestTransformationModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestTransformationModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
module
=
self
.
portal
.
transformation_module
module
=
self
.
portal
.
transformation_module
...
...
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
View file @
7f23608b
...
@@ -336,3 +336,255 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
...
@@ -336,3 +336,255 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
self
.
assertSecurityGroup
(
sale_invoice_transaction
,
[
self
.
user_id
,
self
.
assertSecurityGroup
(
sale_invoice_transaction
,
[
self
.
user_id
,
'G-COMPANY'
,
self
.
person_user
.
getReference
()],
'G-COMPANY'
,
self
.
person_user
.
getReference
()],
False
)
False
)
def
test_SupportRequest_setDestinationDecision
(
self
):
self
.
_makePerson
()
support_request
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
'Support Request'
)
self
.
assertSecurityGroup
(
support_request
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
support_request
.
edit
(
destination_decision
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
support_request
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Acknowledgement_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Acknowledgement'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Acknowledgement_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Acknowledgement'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_FaxMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Fax Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_FaxMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Fax Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Letter_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Letter'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Letter_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Letter'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_MailMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Mail Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_MailMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Mail Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Note_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Note'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Note_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Note'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_PhoneCall_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Phone Call'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_PhoneCall_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Phone Call'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_ShortMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Short Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_ShortMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Short Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_SiteMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Site Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_SiteMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Site Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Visit_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Visit'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_Visit_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Visit'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_WebMessage_setDestination
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Web Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
destination
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
def
test_WebMessage_setSource
(
self
):
self
.
_makePerson
()
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
'Web Message'
)
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
event
.
edit
(
source
=
self
.
person_user
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
event
,
[
'G-COMPANY'
,
self
.
user_id
,
self
.
person_reference
],
False
)
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interactions/Event_edit.xml
0 → 100644
View file @
7f23608b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionDefinition"
module=
"Products.ERP5.Interaction"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
activate_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<list>
<string>
Base_updateAllLocalRoles
</string>
</list>
</value>
</item>
<item>
<key>
<string>
before_commit_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Event_edit
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
_setDestination.*
</string>
<string>
_setSource.*
</string>
</list>
</value>
</item>
<item>
<key>
<string>
once_per_transaction
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<list>
<string>
Acknowledgement
</string>
</list>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/bt/revision
View file @
7f23608b
157
158
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
View file @
7f23608b
Acknowledgement | local_permission_slapos_interaction_workflow
Computer Model | local_permission_slapos_interaction_workflow
Computer Model | local_permission_slapos_interaction_workflow
Computer Network | local_permission_slapos_interaction_workflow
Computer Network | local_permission_slapos_interaction_workflow
Computer | local_permission_slapos_interaction_workflow
Computer | local_permission_slapos_interaction_workflow
...
...
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