[CMF-checkins] CVS: CMF/CMFCore - ActionsTool.py:1.18.2.2 DiscussionTool.py:1.5.2.1 FSPropertiesObject.py:1.7.2.1 MemberDataTool.py:1.12.2.1 MembershipTool.py:1.16.2.1 RegistrationTool.py:1.7.2.1 UndoTool.py:1.4.2.1
Tres Seaver
tseaver@zope.com
Mon, 10 Dec 2001 19:51:42 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv6474/CMFCore
Modified Files:
Tag: CMF-1_2-branch
ActionsTool.py DiscussionTool.py FSPropertiesObject.py
MemberDataTool.py MembershipTool.py RegistrationTool.py
UndoTool.py
Log Message:
- Normalize return from 'listActions' to a list.
- Remove debugging cruft.
=== CMF/CMFCore/ActionsTool.py 1.18.2.1 => 1.18.2.2 ===
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
+ actions = []
+ folder_url = info.folder_url
+ content_url = info.content_url
+ if folder_url is not None:
+ actions.append(
+ { 'id' : 'foldercontents'
+ , 'name' : 'Folder contents'
+ , 'url' : folder_url + '/folder_contents'
+ , 'permissions' : ['List folder contents']
+ , 'category' : 'folder'
+ })
+ return actions
security.declareProtected( CMFCorePermissions.ManagePortal
, 'deleteActionProvider'
=== CMF/CMFCore/DiscussionTool.py 1.5 => 1.5.2.1 ===
content = info.content
if content is None or not self.isDiscussionAllowedFor(content):
- return None
+ return []
discussion = self.getDiscussionFor(content)
if discussion.aq_base == content.aq_base:
=== CMF/CMFCore/FSPropertiesObject.py 1.7 => 1.7.2.1 ===
})
except:
- import pdb; pdb.set_trace()
raise ValueError, ( 'Error processing line %s of %s:\n%s'
% (lino,fp,line) )
self._properties = tuple(map)
=== CMF/CMFCore/MemberDataTool.py 1.12 => 1.12.2.1 ===
security.declarePrivate('listActions')
def listActions(self, info):
- return None
+ return []
security.declarePrivate('getMemberDataContents')
def getMemberDataContents(self):
=== CMF/CMFCore/MembershipTool.py 1.16 => 1.16.2.1 ===
security.declarePrivate('listActions')
def listActions(self, info):
- return None
+ return []
security.declarePublic('getHomeFolder')
def getHomeFolder(self, id=None, verifyPermission=0):
=== CMF/CMFCore/RegistrationTool.py 1.7 => 1.7.2.1 ===
security.declarePrivate('listActions')
def listActions(self, info):
- return none
+ return []
security.declarePublic('isRegistrationAllowed')
def isRegistrationAllowed(self, REQUEST):
=== CMF/CMFCore/UndoTool.py 1.4 => 1.4.2.1 ===
security.declarePrivate('listActions')
def listActions( self, info ):
- if info.isAnonymous:
- return []
return [ { 'name': 'Undo'
, 'url': 'undo_form'
, 'permissions': [ ListUndoableChanges ]