Commit b6fba79a authored by Alexandre Boeglin's avatar Alexandre Boeglin

As proposed by JP, Documents should be protected by AccessContentsInformation,

instead of View.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5095 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 551f1479
...@@ -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
......
...@@ -49,7 +49,7 @@ class ApparelMeasurement(XMLObject, XMLMatrix, Image): ...@@ -49,7 +49,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
......
...@@ -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,4 +59,4 @@ class Budget( Predicate ): ...@@ -59,4 +59,4 @@ class Budget( Predicate ):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
...@@ -64,7 +64,7 @@ class BudgetCell(Predicate, MetaNode ): ...@@ -64,7 +64,7 @@ class BudgetCell(Predicate, MetaNode ):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.View, 'getTitle') security.declareProtected(Permissions.View, 'getTitle')
def getTitle(self): def getTitle(self):
......
...@@ -61,4 +61,4 @@ class BudgetLine( Predicate, XMLMatrix ): ...@@ -61,4 +61,4 @@ class BudgetLine( Predicate, XMLMatrix ):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
...@@ -58,7 +58,7 @@ class BudgetTransaction( DeliveryLine ): ...@@ -58,7 +58,7 @@ class BudgetTransaction( DeliveryLine ):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable') security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable')
def isAccountable(self): def isAccountable(self):
......
...@@ -59,4 +59,4 @@ class BudgetTransfer( Supply ): ...@@ -59,4 +59,4 @@ class BudgetTransfer( Supply ):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
...@@ -58,4 +58,4 @@ class BudgetTransferLine( SupplyLine ): ...@@ -58,4 +58,4 @@ class BudgetTransferLine( SupplyLine ):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
...@@ -121,7 +121,7 @@ class Category(Folder): ...@@ -121,7 +121,7 @@ class Category(Folder):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.ManagePortal, security.declareProtected(Permissions.ManagePortal,
'manage_editProperties', 'manage_editProperties',
'manage_changeProperties', 'manage_changeProperties',
...@@ -536,7 +536,7 @@ class BaseCategory(Category): ...@@ -536,7 +536,7 @@ class BaseCategory(Category):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
def asSqlExpression(self, strict_membership=0, table='category'): def asSqlExpression(self, strict_membership=0, table='category'):
""" """
......
...@@ -98,7 +98,7 @@ class ERP5Site ( FolderMixIn, CMFSite ): ...@@ -98,7 +98,7 @@ class ERP5Site ( FolderMixIn, CMFSite ):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.View, 'view') security.declareProtected(Permissions.View, 'view')
def view(self): def view(self):
......
...@@ -87,7 +87,7 @@ Attribute Sets ...@@ -87,7 +87,7 @@ Attribute Sets
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(ERP5Permissions.View) security.declareObjectProtected(ERP5Permissions.AccessContentsInformation)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -145,7 +145,7 @@ class %(class_name)s(Node, XMLObject): ...@@ -145,7 +145,7 @@ class %(class_name)s(Node, XMLObject):
# 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,7 +59,7 @@ class Preference( Folder ): ...@@ -59,7 +59,7 @@ class Preference( Folder ):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
def __init__(self, id) : def __init__(self, id) :
Folder.__init__(self, id) Folder.__init__(self, id)
......
...@@ -58,7 +58,7 @@ class FolderMixIn(ExtensionClass.Base, CopyContainer): ...@@ -58,7 +58,7 @@ class FolderMixIn(ExtensionClass.Base, CopyContainer):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.AddPortalContent, 'newContent') security.declareProtected(Permissions.AddPortalContent, 'newContent')
def newContent(self, id=None, portal_type=None, id_group=None, def newContent(self, id=None, portal_type=None, id_group=None,
...@@ -252,7 +252,7 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn): ...@@ -252,7 +252,7 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn):
# 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
......
...@@ -225,7 +225,7 @@ class %s(XMLObject): ...@@ -225,7 +225,7 @@ class %s(XMLObject):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Default Properties # Default Properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -204,7 +204,7 @@ Adding a Document class ...@@ -204,7 +204,7 @@ Adding a Document class
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
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