[CMF-checkins] CVS: CMF/CMFCore - ActionsTool.py:1.18.2.1 PortalFolder.py:1.27.2.1
Tres Seaver
tseaver@zope.com
Mon, 10 Dec 2001 15:26:40 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv26120/CMFCore
Modified Files:
Tag: CMF-1_2-branch
ActionsTool.py PortalFolder.py
Log Message:
- Move 'folder_contents' back into ActionsTool (merge Andrew's changes from head).
=== CMF/CMFCore/ActionsTool.py 1.18 => 1.18.2.1 ===
meta_type = 'CMF Actions Tool'
- action_providers = ( 'portal_memberdata'
+ action_providers = ( 'portal_actions'
+ , 'portal_memberdata'
, 'portal_registration'
, 'portal_discussion'
, 'portal_membership'
@@ -112,7 +113,23 @@
security.declarePrivate('listActions')
def listActions(self, info):
- return None
+ """
+ List actions available from this tool
+ """
+ if info.isAnonymous:
+ return None
+ else:
+ actions = []
+ folder_url = info.folder_url
+ content_url = info.content_url
+ if folder_url is not None:
+ actions.append(
+ { 'name' : 'Folder contents'
+ , 'url' : folder_url + '/folder_contents'
+ , 'permissions' : ['List folder contents']
+ , 'category' : 'folder'
+ })
+ return actions
security.declareProtected( CMFCorePermissions.ManagePortal
, 'deleteActionProvider'
=== CMF/CMFCore/PortalFolder.py 1.27 => 1.27.2.1 ===
, 'category' : 'folder'
}
- , { 'id' : 'foldercontents'
- , 'name' : 'Folder contents'
- , 'action' : 'folder_contents'
- , 'permissions' : (CMFCorePermissions.ListFolderContents,)
- , 'category' : 'folder'
- }
)
}
,