Ajout déclaration snippet ajax glisser / déposer de fichiers pour la racine du portail.
[Plinn.git] / patch.py
index badf42a..fe60513 100644 (file)
--- a/patch.py
+++ b/patch.py
@@ -1,11 +1,28 @@
 """ Plinn monkey patch
 
-$Id: patch.py 1458 2009-01-30 18:11:21Z pin $
-$URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/patch.py $
+
+
 """
+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