From dacc4a8732118811d10ecff1cee34e6c920769c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Tue, 10 Dec 2013 11:28:06 +0100 Subject: [PATCH 1/1] =?utf8?q?Ajout=20de=20la=20m=C3=A9thode=20put=5Fuploa?= =?utf8?q?d.=20Config=20s=C3=A9curit=C3=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- patch.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/patch.py b/patch.py index 5a7b5b4..fe60513 100644 --- a/patch.py +++ b/patch.py @@ -3,10 +3,26 @@ """ +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) \ No newline at end of file -- 2.20.1