diff --git a/product/ERP5/Interaction.py b/product/ERP5/Interaction.py index e10413e748d4a7ba857b8b1deaf0d734a4c4f89b..25c52d7eefe9c599edca34a47ae1e43df36970df 100644 --- a/product/ERP5/Interaction.py +++ b/product/ERP5/Interaction.py @@ -27,7 +27,7 @@ from Acquisition import aq_inner, aq_parent import Globals 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.Guard import Guard diff --git a/product/ERP5/Tool/InterpolationTool.py b/product/ERP5/Tool/InterpolationTool.py index 430352186327f48058375ffa1d761240ae6c29bd..c52ced9d402e8133428fbde27bdce602c91b67ed 100644 --- a/product/ERP5/Tool/InterpolationTool.py +++ b/product/ERP5/Tool/InterpolationTool.py @@ -26,7 +26,6 @@ # ############################################################################## -from Products.CMFCore import CMFCorePermissions from AccessControl import ClassSecurityInfo from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser from Globals import InitializeClass diff --git a/product/ERP5Catalog/CatalogTool.py b/product/ERP5Catalog/CatalogTool.py index edf75828a579444d750e3c68dae26785816015d5..de89114152305fd30ae1faa88fad29d28035dfb0 100644 --- a/product/ERP5Catalog/CatalogTool.py +++ b/product/ERP5Catalog/CatalogTool.py @@ -29,7 +29,7 @@ from Products.CMFCore.CatalogTool import CatalogTool as CMFCoreCatalogTool from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery -from Products.CMFCore import CMFCorePermissions +from Products.ERP5Type import Permissions from AccessControl import ClassSecurityInfo, getSecurityManager from Products.CMFCore.CatalogTool import IndexableObjectWrapper as CMFCoreIndexableObjectWrapper from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser, getToolByName @@ -200,7 +200,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): __url = CMFCoreCatalogTool.__url manage_catalogFind = CMFCoreCatalogTool.manage_catalogFind - security.declareProtected( CMFCorePermissions.ManagePortal + security.declareProtected( Permissions.ManagePortal , 'manage_schema' ) manage_schema = DTMLFile( 'dtml/manageSchema', globals() ) @@ -552,7 +552,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): limit the results to what the user is allowed to see. """ if not _checkPermission( - CMFCorePermissions.AccessInactivePortalContent, self ): + Permissions.AccessInactivePortalContent, self ): now = DateTime() kw[ 'effective' ] = { 'query' : now, 'range' : 'max' } kw[ 'expires' ] = { 'query' : now, 'range' : 'min' } @@ -604,7 +604,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): """ # XXX This needs to be set again #if not _checkPermission( - # CMFCorePermissions.AccessInactivePortalContent, self ): + # Permissions.AccessInactivePortalContent, self ): # base = aq_base( self ) # now = DateTime() # #kw[ 'effective' ] = { 'query' : now, 'range' : 'max' } diff --git a/product/ERP5Type/Core/CacheFactory.py b/product/ERP5Type/Core/CacheFactory.py index 78f6d44e2ea0b760a8d32582fcddf14931150ce9..af88533baa5c80a10ee0e54ef708ed0d18d498ca 100644 --- a/product/ERP5Type/Core/CacheFactory.py +++ b/product/ERP5Type/Core/CacheFactory.py @@ -28,7 +28,6 @@ from AccessControl import ClassSecurityInfo -from Products.CMFCore import CMFCorePermissions from Products.ERP5Type import Permissions from Products.ERP5Type import PropertySheet from Products.ERP5Type.PropertySheet.CacheFactory import CacheFactory @@ -51,7 +50,7 @@ class CacheFactory(XMLObject): ) security = ClassSecurityInfo() - security.declareProtected(CMFCorePermissions.ManagePortal, + security.declareProtected(Permissions.ManagePortal, 'manage_editProperties', 'manage_changeProperties', 'manage_propertiesForm', diff --git a/product/ERP5Type/Core/DistributedRamCache.py b/product/ERP5Type/Core/DistributedRamCache.py index 62be7d028d88ba5b32535fd1928253b8ef951053..f53895a6091776870c6b95028ee7ccee25263feb 100644 --- a/product/ERP5Type/Core/DistributedRamCache.py +++ b/product/ERP5Type/Core/DistributedRamCache.py @@ -27,9 +27,9 @@ ############################################################################## from AccessControl import ClassSecurityInfo -from Products.CMFCore import CMFCorePermissions from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type import PropertySheet +from Products.ERP5Type import Permissions from Products.ERP5.PropertySheet.SortIndex import SortIndex from Products.ERP5Type.PropertySheet.BaseCache import BaseCache from Products.ERP5Type.PropertySheet.DistributedRamCache import DistributedRamCache @@ -48,7 +48,7 @@ class DistributedRamCache(XMLObject): allowed_types = () security = ClassSecurityInfo() - security.declareProtected(CMFCorePermissions.ManagePortal, + security.declareProtected(Permissions.ManagePortal, 'manage_editProperties', 'manage_changeProperties', 'manage_propertiesForm', diff --git a/product/ERP5Type/Core/Folder.py b/product/ERP5Type/Core/Folder.py index c2a003ade52a0b3605c9579497e3030108c89e0f..f8b9302667074495b913be71379259529dc5f5bb 100644 --- a/product/ERP5Type/Core/Folder.py +++ b/product/ERP5Type/Core/Folder.py @@ -33,11 +33,10 @@ import ExtensionClass from Products.CMFCore.utils import _getAuthenticatedUser from Products.CMFCore.CMFCatalogAware import CMFCatalogAware -from Products.CMFCore import CMFCorePermissions from Products.ERP5Type.Base import Base 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.Cache import CachingMethod from Products.ERP5Type.Utils import sortValueList @@ -954,7 +953,7 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn, WebDAVFolder): object.manage_beforeDelete(object, self) self._delOb(id) - security.declareProtected( CMFCorePermissions.ManagePortal, 'callMethodOnObjectList' ) + security.declareProtected( Permissions.ManagePortal, 'callMethodOnObjectList' ) def callMethodOnObjectList(self, object_path_list, method_id, *args, **kw): """ Very usefull if we want to activate the call of a method diff --git a/product/ERP5Type/Core/RamCache.py b/product/ERP5Type/Core/RamCache.py index 44c9d0c478d62bddae82a2a020a559f04ae87163..c52f3f688cf853678edf35543bbf886bb52a500d 100644 --- a/product/ERP5Type/Core/RamCache.py +++ b/product/ERP5Type/Core/RamCache.py @@ -28,9 +28,9 @@ from AccessControl import ClassSecurityInfo -from Products.CMFCore import CMFCorePermissions from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type import PropertySheet +from Products.ERP5Type import Permissions from Products.ERP5.PropertySheet.SortIndex import SortIndex from Products.ERP5Type.PropertySheet.BaseCache import BaseCache @@ -46,7 +46,7 @@ class RamCache(XMLObject): allowed_types = () security = ClassSecurityInfo() - security.declareProtected(CMFCorePermissions.ManagePortal, + security.declareProtected(Permissions.ManagePortal, 'manage_editProperties', 'manage_changeProperties', 'manage_propertiesForm', diff --git a/product/ERP5Type/Core/SQLCache.py b/product/ERP5Type/Core/SQLCache.py index 8ac49beb10733e0b81c15ad93e6677e10a7e372e..428ae223a3b7d3ed848f0278174d1c55211d6f11 100644 --- a/product/ERP5Type/Core/SQLCache.py +++ b/product/ERP5Type/Core/SQLCache.py @@ -27,10 +27,10 @@ ############################################################################## from AccessControl import ClassSecurityInfo -from Products.CMFCore import CMFCorePermissions from Products.ERP5Type.Base import Base from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type import PropertySheet +from Products.ERP5Type import Permissions from Products.ERP5.PropertySheet.SortIndex import SortIndex from Products.ERP5Type.PropertySheet.BaseCache import BaseCache from Products.ERP5Type.PropertySheet.SQLCache import SQLCache @@ -49,7 +49,7 @@ class SQLCache(XMLObject): allowed_types = () security = ClassSecurityInfo() - security.declareProtected(CMFCorePermissions.ManagePortal, + security.declareProtected(Permissions.ManagePortal, 'manage_editProperties', 'manage_changeProperties', 'manage_propertiesForm',