Commit 62bd8f9f authored by Jérome Perrin's avatar Jérome Perrin

don't use the deprecated Products.CMFCore.CMFCorePermissions but

Products.ERP5Type.Permissions instead. ( I only updated ERP5 ERP5Type and
ERP5Catalog )



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15788 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dd5dc0a4
...@@ -27,7 +27,7 @@ from Acquisition import aq_inner, aq_parent ...@@ -27,7 +27,7 @@ from Acquisition import aq_inner, aq_parent
import Globals import Globals
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.CMFCorePermissions import ManagePortal from Products.ERP5Type.Permissions import ManagePortal
from Products.DCWorkflow.ContainerTab import ContainerTab from Products.DCWorkflow.ContainerTab import ContainerTab
from Products.DCWorkflow.Guard import Guard from Products.DCWorkflow.Guard import Guard
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
# #
############################################################################## ##############################################################################
from Products.CMFCore import CMFCorePermissions
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser
from Globals import InitializeClass from Globals import InitializeClass
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
from Products.CMFCore.CatalogTool import CatalogTool as CMFCoreCatalogTool from Products.CMFCore.CatalogTool import CatalogTool as CMFCoreCatalogTool
from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
from Products.CMFCore import CMFCorePermissions from Products.ERP5Type import Permissions
from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl import ClassSecurityInfo, getSecurityManager
from Products.CMFCore.CatalogTool import IndexableObjectWrapper as CMFCoreIndexableObjectWrapper from Products.CMFCore.CatalogTool import IndexableObjectWrapper as CMFCoreIndexableObjectWrapper
from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser, getToolByName from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser, getToolByName
...@@ -200,7 +200,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -200,7 +200,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
__url = CMFCoreCatalogTool.__url __url = CMFCoreCatalogTool.__url
manage_catalogFind = CMFCoreCatalogTool.manage_catalogFind manage_catalogFind = CMFCoreCatalogTool.manage_catalogFind
security.declareProtected( CMFCorePermissions.ManagePortal security.declareProtected( Permissions.ManagePortal
, 'manage_schema' ) , 'manage_schema' )
manage_schema = DTMLFile( 'dtml/manageSchema', globals() ) manage_schema = DTMLFile( 'dtml/manageSchema', globals() )
...@@ -552,7 +552,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -552,7 +552,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
limit the results to what the user is allowed to see. limit the results to what the user is allowed to see.
""" """
if not _checkPermission( if not _checkPermission(
CMFCorePermissions.AccessInactivePortalContent, self ): Permissions.AccessInactivePortalContent, self ):
now = DateTime() now = DateTime()
kw[ 'effective' ] = { 'query' : now, 'range' : 'max' } kw[ 'effective' ] = { 'query' : now, 'range' : 'max' }
kw[ 'expires' ] = { 'query' : now, 'range' : 'min' } kw[ 'expires' ] = { 'query' : now, 'range' : 'min' }
...@@ -604,7 +604,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -604,7 +604,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
""" """
# XXX This needs to be set again # XXX This needs to be set again
#if not _checkPermission( #if not _checkPermission(
# CMFCorePermissions.AccessInactivePortalContent, self ): # Permissions.AccessInactivePortalContent, self ):
# base = aq_base( self ) # base = aq_base( self )
# now = DateTime() # now = DateTime()
# #kw[ 'effective' ] = { 'query' : now, 'range' : 'max' } # #kw[ 'effective' ] = { 'query' : now, 'range' : 'max' }
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore import CMFCorePermissions
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet from Products.ERP5Type import PropertySheet
from Products.ERP5Type.PropertySheet.CacheFactory import CacheFactory from Products.ERP5Type.PropertySheet.CacheFactory import CacheFactory
...@@ -51,7 +50,7 @@ class CacheFactory(XMLObject): ...@@ -51,7 +50,7 @@ class CacheFactory(XMLObject):
) )
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected(CMFCorePermissions.ManagePortal, security.declareProtected(Permissions.ManagePortal,
'manage_editProperties', 'manage_editProperties',
'manage_changeProperties', 'manage_changeProperties',
'manage_propertiesForm', 'manage_propertiesForm',
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore import CMFCorePermissions
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type import PropertySheet from Products.ERP5Type import PropertySheet
from Products.ERP5Type import Permissions
from Products.ERP5.PropertySheet.SortIndex import SortIndex from Products.ERP5.PropertySheet.SortIndex import SortIndex
from Products.ERP5Type.PropertySheet.BaseCache import BaseCache from Products.ERP5Type.PropertySheet.BaseCache import BaseCache
from Products.ERP5Type.PropertySheet.DistributedRamCache import DistributedRamCache from Products.ERP5Type.PropertySheet.DistributedRamCache import DistributedRamCache
...@@ -48,7 +48,7 @@ class DistributedRamCache(XMLObject): ...@@ -48,7 +48,7 @@ class DistributedRamCache(XMLObject):
allowed_types = () allowed_types = ()
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected(CMFCorePermissions.ManagePortal, security.declareProtected(Permissions.ManagePortal,
'manage_editProperties', 'manage_editProperties',
'manage_changeProperties', 'manage_changeProperties',
'manage_propertiesForm', 'manage_propertiesForm',
......
...@@ -33,11 +33,10 @@ import ExtensionClass ...@@ -33,11 +33,10 @@ import ExtensionClass
from Products.CMFCore.utils import _getAuthenticatedUser from Products.CMFCore.utils import _getAuthenticatedUser
from Products.CMFCore.CMFCatalogAware import CMFCatalogAware from Products.CMFCore.CMFCatalogAware import CMFCatalogAware
from Products.CMFCore import CMFCorePermissions
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from Products.ERP5Type.CopySupport import CopyContainer from Products.ERP5Type.CopySupport import CopyContainer
from Products.ERP5Type import PropertySheet, Permissions from Products.ERP5Type import PropertySheet
from Products.ERP5Type.XMLExportImport import Folder_asXML from Products.ERP5Type.XMLExportImport import Folder_asXML
from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.Utils import sortValueList from Products.ERP5Type.Utils import sortValueList
...@@ -954,7 +953,7 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn, WebDAVFolder): ...@@ -954,7 +953,7 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn, WebDAVFolder):
object.manage_beforeDelete(object, self) object.manage_beforeDelete(object, self)
self._delOb(id) self._delOb(id)
security.declareProtected( CMFCorePermissions.ManagePortal, 'callMethodOnObjectList' ) security.declareProtected( Permissions.ManagePortal, 'callMethodOnObjectList' )
def callMethodOnObjectList(self, object_path_list, method_id, *args, **kw): def callMethodOnObjectList(self, object_path_list, method_id, *args, **kw):
""" """
Very usefull if we want to activate the call of a method Very usefull if we want to activate the call of a method
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore import CMFCorePermissions
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type import PropertySheet from Products.ERP5Type import PropertySheet
from Products.ERP5Type import Permissions
from Products.ERP5.PropertySheet.SortIndex import SortIndex from Products.ERP5.PropertySheet.SortIndex import SortIndex
from Products.ERP5Type.PropertySheet.BaseCache import BaseCache from Products.ERP5Type.PropertySheet.BaseCache import BaseCache
...@@ -46,7 +46,7 @@ class RamCache(XMLObject): ...@@ -46,7 +46,7 @@ class RamCache(XMLObject):
allowed_types = () allowed_types = ()
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected(CMFCorePermissions.ManagePortal, security.declareProtected(Permissions.ManagePortal,
'manage_editProperties', 'manage_editProperties',
'manage_changeProperties', 'manage_changeProperties',
'manage_propertiesForm', 'manage_propertiesForm',
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore import CMFCorePermissions
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type import PropertySheet from Products.ERP5Type import PropertySheet
from Products.ERP5Type import Permissions
from Products.ERP5.PropertySheet.SortIndex import SortIndex from Products.ERP5.PropertySheet.SortIndex import SortIndex
from Products.ERP5Type.PropertySheet.BaseCache import BaseCache from Products.ERP5Type.PropertySheet.BaseCache import BaseCache
from Products.ERP5Type.PropertySheet.SQLCache import SQLCache from Products.ERP5Type.PropertySheet.SQLCache import SQLCache
...@@ -49,7 +49,7 @@ class SQLCache(XMLObject): ...@@ -49,7 +49,7 @@ class SQLCache(XMLObject):
allowed_types = () allowed_types = ()
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected(CMFCorePermissions.ManagePortal, security.declareProtected(Permissions.ManagePortal,
'manage_editProperties', 'manage_editProperties',
'manage_changeProperties', 'manage_changeProperties',
'manage_propertiesForm', 'manage_propertiesForm',
......
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