Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
erp5
Commits
3b1eb041
Commit
3b1eb041
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
1f9debe6
Changes
6
Show 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 @
3b1eb041
...
@@ -69,9 +69,7 @@
...
@@ -69,9 +69,7 @@
<key>
<string>
roles
</string>
</key>
<key>
<string>
roles
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
Assignee
</string>
<string>
Developer
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_validation_workflow/transitions/invalidate_action.xml
View file @
3b1eb041
...
@@ -65,9 +65,7 @@
...
@@ -65,9 +65,7 @@
<key>
<string>
roles
</string>
</key>
<key>
<string>
roles
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
Assignee
</string>
<string>
Developer
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_validation_workflow/transitions/validate_action.xml
View file @
3b1eb041
...
@@ -65,9 +65,7 @@
...
@@ -65,9 +65,7 @@
<key>
<string>
roles
</string>
</key>
<key>
<string>
roles
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
Assignee
</string>
<string>
Developer
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
product/ERP5/bootstrap/erp5_core/bt/change_log
View file @
3b1eb041
2013-07-09 arnaud.fontaine
* ZODB Components: Only Developer Role must be able to invalidate/delete/validate Components.
2013-07-04 arnaud.fontaine
2013-07-04 arnaud.fontaine
* ZODB Components: Version was not displayed properly in Component view.
* ZODB Components: Version was not displayed properly in Component view.
...
...
product/ERP5/bootstrap/erp5_core/bt/revision
View file @
3b1eb041
41115
41116
\ No newline at end of file
\ No newline at end of file
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
3b1eb041
...
@@ -1348,26 +1348,75 @@ class _TestZodbComponent(SecurityTestCase):
...
@@ -1348,26 +1348,75 @@ class _TestZodbComponent(SecurityTestCase):
The new Component should only be in erp5.component.XXX when validated,
The new Component should only be in erp5.component.XXX when validated,
otherwise it should not be importable at all
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
(
test_component
=
self
.
_newComponent
(
'TestValidateInvalidateComponent'
,
'TestValidateInvalidateComponent'
,
'def foobar(*args, **kwargs):
\
n
return "ValidateInvalidate"'
)
'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
.
tic
()
self
.
assertModuleImportable
(
'TestValidateInvalidateComponent'
)
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
.
tic
()
self
.
failIfModuleImportable
(
'TestValidateInvalidateComponent'
)
self
.
failIfModuleImportable
(
'TestValidateInvalidateComponent'
)
test_component
.
validate
(
)
self
.
portal
.
portal_workflow
.
doActionFor
(
test_component
,
'validate_action'
)
self
.
tic
()
self
.
tic
()
self
.
assertModuleImportable
(
'TestValidateInvalidateComponent'
)
self
.
assertModuleImportable
(
'TestValidateInvalidateComponent'
)
test_component
.
invalidate
(
)
self
.
portal
.
portal_workflow
.
doActionFor
(
test_component
,
'invalidate_action'
)
self
.
tic
()
self
.
tic
()
self
.
failIfModuleImportable
(
'TestValidateInvalidateComponent'
)
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
.
portal
.
portal_workflow
.
doActionFor
(
test_component
,
'delete_action'
)
self
.
tic
()
self
.
tic
()
self
.
failIfModuleImportable
(
'TestValidateInvalidateComponent'
)
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