X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/99afe0ce8700bf835ff7bbedf77bb46e58f996d8..dacc4a8732118811d10ecff1cee34e6c920769c3:/patch.py diff --git a/patch.py b/patch.py index a5daab1..fe60513 100644 --- a/patch.py +++ b/patch.py @@ -3,9 +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