Commit a53b79fe authored by Jérome Perrin's avatar Jérome Perrin

import Permissions as Permissions, not ERP5Permissions for consistency



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9154 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f382f0d
...@@ -25,14 +25,17 @@ from AccessControl import ClassSecurityInfo, getSecurityManager ...@@ -25,14 +25,17 @@ from AccessControl import ClassSecurityInfo, getSecurityManager
from Acquisition import aq_base, aq_inner, aq_parent from Acquisition import aq_base, aq_inner, aq_parent
import Products.CMFCore.TypesTool import Products.CMFCore.TypesTool
from Products.CMFCore.TypesTool import TypeInformation, ScriptableTypeInformation, FactoryTypeInformation, TypesTool from Products.CMFCore.TypesTool import TypeInformation
from Products.CMFCore.interfaces.portal_types import ContentTypeInformation as ITypeInformation from Products.CMFCore.TypesTool import FactoryTypeInformation
from Products.CMFCore.TypesTool import TypesTool
from Products.CMFCore.interfaces.portal_types import ContentTypeInformation\
as ITypeInformation
from Products.CMFCore.ActionProviderBase import ActionProviderBase from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.utils import SimpleItemWithProperties from Products.CMFCore.utils import SimpleItemWithProperties
from Products.CMFCore.Expression import createExprContext from Products.CMFCore.Expression import createExprContext
from Products.ERP5Type import PropertySheet from Products.ERP5Type import PropertySheet
from Products.ERP5Type import _dtmldir from Products.ERP5Type import _dtmldir
from Products.ERP5Type import Permissions as ERP5Permissions from Products.ERP5Type import Permissions
# Security uses ERP5Security by default # Security uses ERP5Security by default
try: try:
...@@ -56,7 +59,9 @@ from zLOG import LOG ...@@ -56,7 +59,9 @@ from zLOG import LOG
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT = 'ERP5Type_asSecurityGroupId' ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT = 'ERP5Type_asSecurityGroupId'
class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, TranslationProviderBase ): class ERP5TypeInformation( FactoryTypeInformation,
RoleProviderBase,
TranslationProviderBase ):
""" """
ERP5 Types are based on FactoryTypeInformation ERP5 Types are based on FactoryTypeInformation
...@@ -200,7 +205,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation ...@@ -200,7 +205,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
return ob return ob
security.declareProtected(ERP5Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getPropertySheetList') 'getPropertySheetList')
def getPropertySheetList( self ): def getPropertySheetList( self ):
""" """
...@@ -212,7 +217,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation ...@@ -212,7 +217,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
result.sort() result.sort()
return result return result
security.declareProtected(ERP5Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getHiddenContentTypeList') 'getHiddenContentTypeList')
def getHiddenContentTypeList( self ): def getHiddenContentTypeList( self ):
""" """
...@@ -220,14 +225,14 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation ...@@ -220,14 +225,14 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
""" """
return self.hidden_content_type_list return self.hidden_content_type_list
security.declareProtected(ERP5Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getBaseCategoryList') 'getBaseCategoryList')
def getBaseCategoryList( self ): def getBaseCategoryList( self ):
result = self.portal_categories.getBaseCategoryList() result = self.portal_categories.getBaseCategoryList()
result.sort() result.sort()
return result return result
security.declareProtected(ERP5Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getConstraintList') 'getConstraintList')
def getConstraintList( self ): def getConstraintList( self ):
from Products.ERP5Type import Constraint from Products.ERP5Type import Constraint
...@@ -237,12 +242,12 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation ...@@ -237,12 +242,12 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
result.sort() result.sort()
return result return result
security.declareProtected(ERP5Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getGroupList') 'getGroupList')
def getGroupList( self ): def getGroupList( self ):
return self.defined_group_list return self.defined_group_list
security.declareProtected(ERP5Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getCategoryList') 'getCategoryList')
def getCategoryList(self): def getCategoryList(self):
""" """
...@@ -280,7 +285,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation ...@@ -280,7 +285,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
current_list.append(category) current_list.append(category)
return current_list return current_list
security.declareProtected(ERP5Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getPropertyAndCategoryList') 'getPropertyAndCategoryList')
def getPropertyAndCategoryList(self): def getPropertyAndCategoryList(self):
""" """
...@@ -331,7 +336,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation ...@@ -331,7 +336,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
current_list.append(category) current_list.append(category)
return current_list return current_list
security.declareProtected(ERP5Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getInstancePropertyMap' ) 'getInstancePropertyMap' )
def getInstancePropertyMap(self): def getInstancePropertyMap(self):
""" """
...@@ -600,7 +605,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation ...@@ -600,7 +605,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
_aq_reset() # XXX We should also call it whenever we change workflow defition _aq_reset() # XXX We should also call it whenever we change workflow defition
return result return result
security.declareProtected( ERP5Permissions.ManagePortal, 'manage_editLocalRolesForm' ) security.declareProtected( Permissions.ManagePortal, 'manage_editLocalRolesForm' )
def manage_editLocalRolesForm( self, REQUEST, manage_tabs_message=None ): def manage_editLocalRolesForm( self, REQUEST, manage_tabs_message=None ):
""" Show the 'Local Roles' management tab. """ Show the 'Local Roles' management tab.
......
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