Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Laurent S
erp5
Commits
2641d70b
Commit
2641d70b
authored
Jul 09, 2013
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: Only Developer Role must be able to invalidate/delete/validate Components.
parent
7419da2e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
14 deletions
+60
-14
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_validation_workflow/transitions/delete_action.xml
...mponent_validation_workflow/transitions/delete_action.xml
+1
-3
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_validation_workflow/transitions/invalidate_action.xml
...ent_validation_workflow/transitions/invalidate_action.xml
+1
-3
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_validation_workflow/transitions/validate_action.xml
...onent_validation_workflow/transitions/validate_action.xml
+1
-3
product/ERP5/bootstrap/erp5_core/bt/change_log
product/ERP5/bootstrap/erp5_core/bt/change_log
+3
-0
product/ERP5/bootstrap/erp5_core/bt/revision
product/ERP5/bootstrap/erp5_core/bt/revision
+1
-1
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+53
-4
No files found.
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_validation_workflow/transitions/delete_action.xml
View file @
2641d70b
...
...
@@ -69,9 +69,7 @@
<key>
<string>
roles
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Developer
</string>
</tuple>
</value>
</item>
...
...
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_validation_workflow/transitions/invalidate_action.xml
View file @
2641d70b
...
...
@@ -65,9 +65,7 @@
<key>
<string>
roles
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Developer
</string>
</tuple>
</value>
</item>
...
...
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_validation_workflow/transitions/validate_action.xml
View file @
2641d70b
...
...
@@ -65,9 +65,7 @@
<key>
<string>
roles
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Developer
</string>
</tuple>
</value>
</item>
...
...
product/ERP5/bootstrap/erp5_core/bt/change_log
View file @
2641d70b
2013-07-09 arnaud.fontaine
* ZODB Components: Only Developer Role must be able to invalidate/delete/validate Components.
2013-07-04 arnaud.fontaine
* ZODB Components: Version was not displayed properly in Component view.
...
...
product/ERP5/bootstrap/erp5_core/bt/revision
View file @
2641d70b
41104
\ No newline at end of file
41105
\ No newline at end of file
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
2641d70b
...
...
@@ -1348,26 +1348,75 @@ class _TestZodbComponent(SecurityTestCase):
The new Component should only be in erp5.component.XXX when validated,
otherwise it should not be importable at all
"""
uf
=
self
.
portal
.
acl_users
if
not
uf
.
getUser
(
'ERP5TypeTestCase_NonDeveloper'
):
uf
.
_doAddUser
(
'ERP5TypeTestCase_NonDeveloper'
,
''
,
[
'Manager'
,
'Member'
,
'Assignee'
,
'Assignor'
,
'Author'
,
'Auditor'
,
'Associate'
],
[])
test_component
=
self
.
_newComponent
(
'TestValidateInvalidateComponent'
,
'def foobar(*args, **kwargs):
\
n
return "ValidateInvalidate"'
)
test_component
.
validate
()
self
.
failIfUserCanPassWorkflowTransition
(
'ERP5TypeTestCase_NonDeveloper'
,
'validate_action'
,
test_component
)
self
.
failIfUserCanPassWorkflowTransition
(
'ERP5TypeTestCase'
,
'invalidate_action'
,
test_component
)
from
AccessControl.SecurityManagement
import
getSecurityManager
from
AccessControl.SecurityManagement
import
setSecurityManager
from
Products.CMFCore.WorkflowCore
import
WorkflowException
sm
=
getSecurityManager
()
try
:
self
.
_loginAsUser
(
'ERP5TypeTestCase_NonDeveloper'
)
self
.
assertRaises
(
WorkflowException
,
self
.
portal
.
portal_workflow
.
doActionFor
,
test_component
,
'delete_action'
)
finally
:
setSecurityManager
(
sm
)
self
.
failIfModuleImportable
(
'TestValidateInvalidateComponent'
)
self
.
portal
.
portal_workflow
.
doActionFor
(
test_component
,
'validate_action'
)
self
.
tic
()
self
.
assertModuleImportable
(
'TestValidateInvalidateComponent'
)
test_component
.
invalidate
()
self
.
failIfUserCanPassWorkflowTransition
(
'ERP5TypeTestCase_NonDeveloper'
,
'invalidate_action'
,
test_component
)
self
.
failIfUserCanPassWorkflowTransition
(
'ERP5TypeTestCase'
,
'validate_action'
,
test_component
)
self
.
assertRaises
(
WorkflowException
,
self
.
portal
.
portal_workflow
.
doActionFor
,
test_component
,
'delete_action'
)
self
.
portal
.
portal_workflow
.
doActionFor
(
test_component
,
'invalidate_action'
)
self
.
tic
()
self
.
failIfModuleImportable
(
'TestValidateInvalidateComponent'
)
test_component
.
validate
(
)
self
.
portal
.
portal_workflow
.
doActionFor
(
test_component
,
'validate_action'
)
self
.
tic
()
self
.
assertModuleImportable
(
'TestValidateInvalidateComponent'
)
test_component
.
invalidate
(
)
self
.
portal
.
portal_workflow
.
doActionFor
(
test_component
,
'invalidate_action'
)
self
.
tic
()
self
.
failIfModuleImportable
(
'TestValidateInvalidateComponent'
)
sm
=
getSecurityManager
()
try
:
self
.
_loginAsUser
(
'ERP5TypeTestCase_NonDeveloper'
)
self
.
assertRaises
(
WorkflowException
,
self
.
portal
.
portal_workflow
.
doActionFor
,
test_component
,
'delete_action'
)
finally
:
setSecurityManager
(
sm
)
self
.
portal
.
portal_workflow
.
doActionFor
(
test_component
,
'delete_action'
)
self
.
tic
()
self
.
failIfModuleImportable
(
'TestValidateInvalidateComponent'
)
...
...
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