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): ...@@ -47,7 +47,7 @@ class ApparelAssortment(Resource, XMLMatrix):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -47,7 +47,7 @@ class ApparelCloth(Resource, XMLMatrix): ...@@ -47,7 +47,7 @@ class ApparelCloth(Resource, XMLMatrix):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -46,7 +46,7 @@ class ApparelColourRange(Resource): ...@@ -46,7 +46,7 @@ class ApparelColourRange(Resource):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -43,7 +43,7 @@ class ApparelComponent(Resource): ...@@ -43,7 +43,7 @@ class ApparelComponent(Resource):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -43,7 +43,7 @@ class ApparelFabric(Resource): ...@@ -43,7 +43,7 @@ class ApparelFabric(Resource):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -47,7 +47,7 @@ class ApparelMeasurement(XMLObject, XMLMatrix, Image): ...@@ -47,7 +47,7 @@ class ApparelMeasurement(XMLObject, XMLMatrix, Image):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
...@@ -65,13 +65,14 @@ class ApparelMeasurement(XMLObject, XMLMatrix, Image): ...@@ -65,13 +65,14 @@ class ApparelMeasurement(XMLObject, XMLMatrix, Image):
# Inheritance # Inheritance
_edit = Image._edit _edit = Image._edit
security.declareProtected( Permissions.ModifyPortalContent, 'edit' ) security.declareProtected(Permissions.ModifyPortalContent, 'edit' )
edit = WorkflowAction( _edit ) edit = WorkflowAction( _edit )
security.declareProtected('View', 'index_html') security.declareProtected(Permissions.View, 'index_html')
index_html = Image.index_html index_html = Image.index_html
security.declareProtected('AccessContentsInformation', 'content_type') security.declareProtected(Permissions.AccessContentsInformation,
'content_type')
content_type = Image.content_type content_type = Image.content_type
def manage_afterClone(self, item): def manage_afterClone(self, item):
......
...@@ -44,7 +44,7 @@ class ApparelModel(Resource, XMLMatrix): ...@@ -44,7 +44,7 @@ class ApparelModel(Resource, XMLMatrix):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -43,7 +43,7 @@ class ApparelShape(Resource): ...@@ -43,7 +43,7 @@ class ApparelShape(Resource):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -47,7 +47,7 @@ class ApparelSize(XMLObject, XMLMatrix): ...@@ -47,7 +47,7 @@ class ApparelSize(XMLObject, XMLMatrix):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
...@@ -59,6 +59,7 @@ class ApparelSize(XMLObject, XMLMatrix): ...@@ -59,6 +59,7 @@ class ApparelSize(XMLObject, XMLMatrix):
, PropertySheet.ApparelSize , PropertySheet.ApparelSize
) )
# XXX this should be done using an interraction workflow
security.declareProtected(Permissions.ModifyPortalContent, '_updateMatrixCellRange') security.declareProtected(Permissions.ModifyPortalContent, '_updateMatrixCellRange')
def _updateMatrixCellRange(self): def _updateMatrixCellRange(self):
lines = self.ApparelSize_asCellRange()[0] lines = self.ApparelSize_asCellRange()[0]
...@@ -69,6 +70,7 @@ class ApparelSize(XMLObject, XMLMatrix): ...@@ -69,6 +70,7 @@ class ApparelSize(XMLObject, XMLMatrix):
else: else:
self.setCellRange(lines, base_id='size') self.setCellRange(lines, base_id='size')
# XXX this should be done using an interraction workflow
security.declareProtected(Permissions.ModifyPortalContent, '_setSizeList') security.declareProtected(Permissions.ModifyPortalContent, '_setSizeList')
def _setSizeList(self,value): def _setSizeList(self,value):
self._categorySetSizeList(value) self._categorySetSizeList(value)
......
37 38
\ No newline at end of file \ 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