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
Ekaterina
erp5
Commits
3c2e966d
Commit
3c2e966d
authored
Feb 11, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing securities for Component class.
parent
0511e0de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
product/ERP5Type/Core/Component.py
product/ERP5Type/Core/Component.py
+9
-0
No files found.
product/ERP5Type/Core/Component.py
View file @
3c2e966d
...
@@ -58,6 +58,7 @@ class Component(Base):
...
@@ -58,6 +58,7 @@ class Component(Base):
'Reference'
,
'Reference'
,
'TextDocument'
)
'TextDocument'
)
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'checkConsistency'
)
def
checkConsistency
(
self
,
text_content
=
None
,
*
args
,
**
kw
):
def
checkConsistency
(
self
,
text_content
=
None
,
*
args
,
**
kw
):
"""
"""
XXX-arnau: should probably in a separate Constraint class
XXX-arnau: should probably in a separate Constraint class
...
@@ -87,6 +88,7 @@ class Component(Base):
...
@@ -87,6 +88,7 @@ class Component(Base):
return
[]
return
[]
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'addToRegistry'
)
def
addToRegistry
(
self
):
def
addToRegistry
(
self
):
"""
"""
Add the Component to its appropriate module registry
Add the Component to its appropriate module registry
...
@@ -100,6 +102,8 @@ class Component(Base):
...
@@ -100,6 +102,8 @@ class Component(Base):
'component'
:
self
,
'component'
:
self
,
'module_name'
:
"%s.%s"
%
(
namespace_fullname
,
reference
)}
'module_name'
:
"%s.%s"
%
(
namespace_fullname
,
reference
)}
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'deleteFromRegistry'
)
def
deleteFromRegistry
(
self
):
def
deleteFromRegistry
(
self
):
"""
"""
Delete the Component from its appropriate module registry
Delete the Component from its appropriate module registry
...
@@ -156,6 +160,8 @@ class Component(Base):
...
@@ -156,6 +160,8 @@ class Component(Base):
else
:
else
:
return
super
(
Component
,
self
).
_setTextContent
(
text_content
)
return
super
(
Component
,
self
).
_setTextContent
(
text_content
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTextContent'
)
def
getTextContent
(
self
,
validated_only
=
False
):
def
getTextContent
(
self
,
validated_only
=
False
):
"""
"""
Return the source code of the validated source code (if validated_only is
Return the source code of the validated source code (if validated_only is
...
@@ -177,6 +183,8 @@ class Component(Base):
...
@@ -177,6 +183,8 @@ class Component(Base):
current_workflow
=
self
.
workflow_history
[
'component_validation_workflow'
][
-
1
]
current_workflow
=
self
.
workflow_history
[
'component_validation_workflow'
][
-
1
]
return
current_workflow
[
'error_message'
]
return
current_workflow
[
'error_message'
]
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTranslatedValidationStateTitleWithErrorMessage'
)
def
getTranslatedValidationStateTitleWithErrorMessage
(
self
):
def
getTranslatedValidationStateTitleWithErrorMessage
(
self
):
validation_state_title
=
self
.
getTranslatedValidationStateTitle
()
validation_state_title
=
self
.
getTranslatedValidationStateTitle
()
error_message
=
self
.
_getErrorMessage
()
error_message
=
self
.
_getErrorMessage
()
...
@@ -186,6 +194,7 @@ class Component(Base):
...
@@ -186,6 +194,7 @@ class Component(Base):
return
validation_state_title
return
validation_state_title
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'load'
)
def
load
(
self
,
namespace_dict
=
{},
validated_only
=
False
,
text_content
=
None
):
def
load
(
self
,
namespace_dict
=
{},
validated_only
=
False
,
text_content
=
None
):
"""
"""
Load the source code into the given dict. Using exec() rather than
Load the source code into the given dict. Using exec() rather than
...
...
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