X-Git-Url: https://scm.cri.minesparis.psl.eu/git/Plinn.git/blobdiff_plain/3c4367d8e03450e9a73e61f4247145d2b6c86a33..959d888c17d1403d2eeecc19bc4b5e2c8d1debf6:/patch.py diff --git a/patch.py b/patch.py deleted file mode 100644 index ebc324f..0000000 --- a/patch.py +++ /dev/null @@ -1,40 +0,0 @@ -""" Plinn monkey patch - - - -""" -from AccessControl import ClassSecurityInfo -from Products.CMFCore.permissions import ListFolderContents, View, ViewManagementScreens,\ - ManageProperties, AddPortalFolders, AddPortalContent,\ - ManagePortal, ModifyPortalContent - -from Products.CMFCore.PortalFolder import PortalFolder as CMFPortalFolder -from Folder import PlinnFolder -from utils import getCPInfo, popCP - -cmfPortalFolderSecurity = ClassSecurityInfo() - -cmfPortalFolderSecurity.declareProtected(ListFolderContents, 'listFolderContents') -CMFPortalFolder.listFolderContents = PlinnFolder.listFolderContents.im_func - -cmfPortalFolderSecurity.declareProtected(ListFolderContents, 'listNearestFolderContents') -CMFPortalFolder.listNearestFolderContents = PlinnFolder.listNearestFolderContents.im_func - -cmfPortalFolderSecurity.declareProtected(ListFolderContents, 'listCatalogedContents') -CMFPortalFolder.listCatalogedContents = PlinnFolder.listCatalogedContents.im_func - -cmfPortalFolderSecurity.declareProtected(AddPortalContent, 'put_upload') -CMFPortalFolder.put_upload = PlinnFolder.put_upload.im_func - -cmfPortalFolderSecurity.declarePublic('getCPInfo') -CMFPortalFolder.getCPInfo = getCPInfo - -cmfPortalFolderSecurity.declarePublic('getCP') -CMFPortalFolder.popCP = popCP - -cmfPortalFolderSecurity.apply(CMFPortalFolder) - - -from Products.CMFDefault.formlib.form import _EditFormMixin -from patch_impl import _setRedirect -_EditFormMixin._setRedirect = _setRedirect \ No newline at end of file