[CMF-checkins] CVS: CMF/CMFCore - MembershipTool.py:1.35.2.1
Yvo Schubbe
schubbe@web.de
Thu, 29 May 2003 10:40:27 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv13035/CMFCore
Modified Files:
Tag: yuppie-createMemberarea-branch
MembershipTool.py
Log Message:
changed member area creation:
- made logged_in page instead of wrapUser call 'createMemberarea'
- made MembershipTool folderish to store skeleton content inside
- added a hook to 'createMemberarea' to customize member content creation
- adjusted tests
=== CMF/CMFCore/MembershipTool.py 1.35 => 1.35.2.1 ===
--- CMF/CMFCore/MembershipTool.py:1.35 Wed May 28 07:52:15 2003
+++ CMF/CMFCore/MembershipTool.py Thu May 29 10:39:56 2003
@@ -17,7 +17,7 @@
from utils import UniqueObject, _getAuthenticatedUser, _checkPermission
from utils import getToolByName, _dtmldir
-from OFS.SimpleItem import SimpleItem
+from OFS.Folder import Folder
from Globals import InitializeClass, DTMLFile, MessageDialog, \
PersistentMapping
from Acquisition import aq_base
@@ -41,7 +41,7 @@
in the Tool Box on the left.
'''
-class MembershipTool (UniqueObject, SimpleItem, ActionProviderBase):
+class MembershipTool(UniqueObject, Folder, ActionProviderBase):
""" This tool accesses member data through an acl_users object.
It can be replaced with something that accesses member data in a
@@ -65,7 +65,7 @@
( { 'label' : 'Overview'
, 'action' : 'manage_overview'
},
- ) + SimpleItem.manage_options)
+ ) + Folder.manage_options)
#
# ZMI methods
@@ -138,15 +138,7 @@
md = getToolByName(parent, 'portal_memberdata')
try:
portal_user = md.wrapUser(u)
-
- # Check for the member area creation flag and
- # take appropriate (non-) action
- if getattr(self, 'memberareaCreationFlag', 0) != 0:
- if self.getHomeUrl(portal_user.getId()) is None:
- self.createMemberarea(portal_user.getId())
-
return portal_user
-
except:
from zLOG import LOG, ERROR
import sys