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
Ayush Tiwari
erp5
Commits
619712ad
Commit
619712ad
authored
Jul 06, 2016
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_catalog: Set declarative securities and solve some inheritance conflicts
parent
37b80134
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
product/ERP5Catalog/ERP5Catalog.py
product/ERP5Catalog/ERP5Catalog.py
+17
-5
No files found.
product/ERP5Catalog/ERP5Catalog.py
View file @
619712ad
...
@@ -55,7 +55,20 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -55,7 +55,20 @@ class ERP5Catalog(Folder, Catalog):
allowed_types
=
()
allowed_types
=
()
#TODO(low priority): Add an icon to display at ERP5 Zope interface
#TODO(low priority): Add an icon to display at ERP5 Zope interface
icon
=
None
icon
=
None
# Declarative security
security
=
ClassSecurityInfo
()
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'manage_editProperties'
,
'manage_changeProperties'
,
'manage_propertiesForm'
,
)
#_properties = Catalog._properties
#_propertyMap = Catalog._propertyMap
#_setPropValue = Catalog._setPropValue
#getProperty = Catalog.getProperty
manage_options
=
(
Folder
.
manage_options
+
manage_options
=
(
Folder
.
manage_options
+
OFS
.
History
.
Historical
.
manage_options
OFS
.
History
.
Historical
.
manage_options
...
@@ -65,14 +78,10 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -65,14 +78,10 @@ class ERP5Catalog(Folder, Catalog):
property_sheets
=
(
PropertySheet
.
Base
property_sheets
=
(
PropertySheet
.
Base
,
PropertySheet
.
SimpleItem
,
PropertySheet
.
SimpleItem
,
PropertySheet
.
Folder
,
PropertySheet
.
Folder
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
Catalog
,
PropertySheet
.
Catalog
)
)
_properties
=
Catalog
.
_properties
_propertyMap
=
Catalog
.
_propertyMap
_setPropValue
=
Catalog
.
_setPropValue
getProperty
=
Catalog
.
getProperty
# Declarative Constructors
# Declarative Constructors
constructors
=
(
manage_addERP5CatalogForm
,
manage_addERP5Catalog
,)
constructors
=
(
manage_addERP5CatalogForm
,
manage_addERP5Catalog
,)
...
@@ -93,6 +102,9 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -93,6 +102,9 @@ class ERP5Catalog(Folder, Catalog):
meta_types
.
append
(
meta_type
)
meta_types
.
append
(
meta_type
)
return
meta_types
return
meta_types
_updateProperty
=
Catalog
.
_updateProperty
_setPropValue
=
Catalog
.
_setPropValue
InitializeClass
(
ERP5Catalog
)
InitializeClass
(
ERP5Catalog
)
class
ERP5CatalogError
(
CatalogError
):
pass
class
ERP5CatalogError
(
CatalogError
):
pass
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