From: Benoît Pin Date: Tue, 10 Dec 2013 10:28:06 +0000 (+0100) Subject: Ajout de la méthode put_upload. Config sécurité. X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/dacc4a8732118811d10ecff1cee34e6c920769c3?ds=inline Ajout de la méthode put_upload. Config sécurité. --- 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