Commit 216f1b63 authored by Fabien Morin's avatar Fabien Morin

update class permission to use existing ones

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29297 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de9922fb
......@@ -47,7 +47,7 @@ class ApparelAssortment(Resource, XMLMatrix):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -47,7 +47,7 @@ class ApparelCloth(Resource, XMLMatrix):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -46,7 +46,7 @@ class ApparelColourRange(Resource):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -43,7 +43,7 @@ class ApparelComponent(Resource):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -43,7 +43,7 @@ class ApparelFabric(Resource):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -47,7 +47,7 @@ class ApparelMeasurement(XMLObject, XMLMatrix, Image):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......@@ -65,13 +65,14 @@ class ApparelMeasurement(XMLObject, XMLMatrix, Image):
# Inheritance
_edit = Image._edit
security.declareProtected( Permissions.ModifyPortalContent, 'edit' )
security.declareProtected(Permissions.ModifyPortalContent, 'edit' )
edit = WorkflowAction( _edit )
security.declareProtected('View', 'index_html')
security.declareProtected(Permissions.View, 'index_html')
index_html = Image.index_html
security.declareProtected('AccessContentsInformation', 'content_type')
security.declareProtected(Permissions.AccessContentsInformation,
'content_type')
content_type = Image.content_type
def manage_afterClone(self, item):
......
......@@ -44,7 +44,7 @@ class ApparelModel(Resource, XMLMatrix):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -43,7 +43,7 @@ class ApparelShape(Resource):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -47,7 +47,7 @@ class ApparelSize(XMLObject, XMLMatrix):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......@@ -59,6 +59,7 @@ class ApparelSize(XMLObject, XMLMatrix):
, PropertySheet.ApparelSize
)
# XXX this should be done using an interraction workflow
security.declareProtected(Permissions.ModifyPortalContent, '_updateMatrixCellRange')
def _updateMatrixCellRange(self):
lines = self.ApparelSize_asCellRange()[0]
......@@ -69,6 +70,7 @@ class ApparelSize(XMLObject, XMLMatrix):
else:
self.setCellRange(lines, base_id='size')
# XXX this should be done using an interraction workflow
security.declareProtected(Permissions.ModifyPortalContent, '_setSizeList')
def _setSizeList(self,value):
self._categorySetSizeList(value)
......
37
\ No newline at end of file
38
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment