[CMF-checkins] CVS: CMF/CMFCollector - Collector.py:1.43.2.2
permissions.py:1.4.2.2
Yvo Schubbe
y.2004_ at wcm-solutions.de
Tue Sep 14 12:56:44 EDT 2004
Update of /cvs-repository/CMF/CMFCollector
In directory cvs.zope.org:/tmp/cvs-serv6110/CMFCollector
Modified Files:
Tag: yuppie-post_1_5-cleanup-branch
Collector.py permissions.py
Log Message:
- made some changes for CMF 1.4 *and* HEAD compatibility
=== CMF/CMFCollector/Collector.py 1.43.2.1 => 1.43.2.2 ===
--- CMF/CMFCollector/Collector.py:1.43.2.1 Sun Sep 12 13:10:48 2004
+++ CMF/CMFCollector/Collector.py Tue Sep 14 12:56:14 2004
@@ -10,8 +10,10 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
+""" Implement the Collector issue-container content type.
-"""Implement the Collector issue-container content type."""
+$Id$
+"""
import os, urllib
from DateTime import DateTime
@@ -28,15 +30,16 @@
import util
-from permissions import View
-from permissions import AddPortalContent
-from permissions import AccessInactivePortalContent
from permissions import AccessFuturePortalContent
-from permissions import ViewCollector
+from permissions import AccessInactivePortalContent
from permissions import AddCollectorIssue
-from permissions import EditCollectorIssue
from permissions import AddCollectorIssueFollowup
+from permissions import AddPortalContent
+from permissions import EditCollectorIssue
+from permissions import ListFolderContents
from permissions import ManageCollector
+from permissions import View
+from permissions import ViewCollector
from CollectorIssue import addCollectorIssue, CollectorIssue
@@ -69,6 +72,20 @@
'name': 'Configure',
'action': 'string:${object_url}/collector_edit_form',
'permissions': (ManageCollector,)},
+ {'id': 'folderContents',
+ 'name': 'Folder contents',
+ 'action': 'string:${object_url}/folder_contents',
+ 'permissions': (ListFolderContents,)},
+ {'id': 'new',
+ 'name': 'New...',
+ 'action': 'string:${object_url}/folder_factories',
+ 'permissions': (AddPortalContent,),
+ 'visible': 0},
+ {'id': 'rename_items',
+ 'name': 'Rename items',
+ 'action': 'string:${object_url}/folder_rename_form',
+ 'permissions': (AddPortalContent,),
+ 'visible': 0},
),
},
)
=== CMF/CMFCollector/permissions.py 1.4.2.1 => 1.4.2.2 ===
--- CMF/CMFCollector/permissions.py:1.4.2.1 Sun Sep 12 13:31:45 2004
+++ CMF/CMFCollector/permissions.py Tue Sep 14 12:56:14 2004
@@ -1,10 +1,25 @@
+##############################################################################
+#
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
""" CMFCollector product permissions
$Id$
"""
from AccessControl import ModuleSecurityInfo
-from Products.CMFCore import permissions as core_permissions
+try:
+ from Products.CMFCore import permissions as core_permissions
+except ImportError: # CMF < 1.5
+ from Products.CMFCore import CMFCorePermissions as core_permissions
setDefaultRoles = core_permissions.setDefaultRoles
@@ -21,6 +36,9 @@
security.declarePublic('AccessFuturePortalContent')
AccessFuturePortalContent = core_permissions.AccessFuturePortalContent
+
+security.declarePublic('ListFolderContents')
+ListFolderContents = core_permissions.ListFolderContents
security.declarePublic('ModifyPortalContent')
ModifyPortalContent = core_permissions.ModifyPortalContent
More information about the CMF-checkins
mailing list