X-Git-Url: https://scm.cri.mines-paristech.fr/git/Plinn.git/blobdiff_plain/b256003a249073e88612be6400ae8e9abf80d7b5..8f40b26abe44b2589a48b70865a1d4260f041ed4:/patch.py?ds=sidebyside diff --git a/patch.py b/patch.py index 5a7b5b4..5f99887 100644 --- a/patch.py +++ b/patch.py @@ -3,10 +3,31 @@ """ +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 +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.apply(CMFPortalFolder) + + +from Products.CMFDefault.formlib.form import _EditFormMixin +from patch_impl import _setRedirect +_EditFormMixin._setRedirect = _setRedirect \ No newline at end of file