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):
# 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
......
......@@ -49,7 +49,7 @@ class ApparelMeasurement(XMLObject, XMLMatrix, Image):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -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,4 +59,4 @@ class Budget( Predicate ):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
......@@ -64,7 +64,7 @@ class BudgetCell(Predicate, MetaNode ):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.View, 'getTitle')
def getTitle(self):
......
......@@ -61,4 +61,4 @@ class BudgetLine( Predicate, XMLMatrix ):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
......@@ -58,7 +58,7 @@ class BudgetTransaction( DeliveryLine ):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable')
def isAccountable(self):
......
......@@ -59,4 +59,4 @@ class BudgetTransfer( Supply ):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
......@@ -58,4 +58,4 @@ class BudgetTransferLine( SupplyLine ):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
......@@ -121,7 +121,7 @@ class Category(Folder):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.ManagePortal,
'manage_editProperties',
'manage_changeProperties',
......@@ -536,7 +536,7 @@ class BaseCategory(Category):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
def asSqlExpression(self, strict_membership=0, table='category'):
"""
......
......@@ -98,7 +98,7 @@ class ERP5Site ( FolderMixIn, CMFSite ):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.View, 'view')
def view(self):
......
......@@ -87,7 +87,7 @@ Attribute Sets
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(ERP5Permissions.View)
security.declareObjectProtected(ERP5Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......@@ -436,4 +436,4 @@ Possible scenario
Future
Atribute lookup should be put outside property sheet
into a tool ?
\ No newline at end of file
into a tool ?
......@@ -145,7 +145,7 @@ class %(class_name)s(Node, XMLObject):
# Declarative Security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative Properties
property_sheets = ( PropertySheet.Base
......
......@@ -59,7 +59,7 @@ class Preference( Folder ):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
def __init__(self, id) :
Folder.__init__(self, id)
......
......@@ -58,7 +58,7 @@ class FolderMixIn(ExtensionClass.Base, CopyContainer):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
security.declareProtected(Permissions.AddPortalContent, 'newContent')
def newContent(self, id=None, portal_type=None, id_group=None,
......@@ -252,7 +252,7 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.Base
......
......@@ -225,7 +225,7 @@ class %s(XMLObject):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Default Properties
property_sheets = ( PropertySheet.Base
......
......@@ -204,7 +204,7 @@ Adding a Document class
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Default Properties
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