[CMF-checkins] CVS: CMF/CMFDefault - MembershipTool.py:1.34
Yvo Schubbe
schubbe@web.de
Wed, 28 May 2003 06:58:13 -0400
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv32699/CMFDefault
Modified Files:
MembershipTool.py
Log Message:
Merged yuppie-collector162-branch:
- Fixed member area Ownership and Roles. (Collector #162)
=== CMF/CMFDefault/MembershipTool.py 1.33 => 1.34 ===
--- CMF/CMFDefault/MembershipTool.py:1.33 Fri Mar 14 14:28:49 2003
+++ CMF/CMFDefault/MembershipTool.py Wed May 28 06:57:42 2003
@@ -23,7 +23,6 @@
from Globals import InitializeClass
from Products.CMFCore.MembershipTool import MembershipTool as BaseTool
-from Products.CMFCore.PortalFolder import manage_addPortalFolder
from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.ActionProviderBase import ActionProviderBase
@@ -186,7 +185,6 @@
members.manage_addPortalFolder( id=member_id, title=f_title )
f=getattr(members, member_id)
- # Grant ownership to Member
acl_users = self.__getPUS()
user = acl_users.getUser(member_id)
@@ -200,7 +198,9 @@
raise NotImplementedError, \
'cannot get user for member area creation'
+ # Grant Ownership and Owner role to Member
f.changeOwnership(user)
+ f.__ac_local_roles__ = None
f.manage_setLocalRoles(member_id, ['Owner'])
# Create Member's home page.
@@ -213,6 +213,11 @@
, "structured-text"
, (DEFAULT_MEMBER_CONTENT % member_id)
)
+
+ # Grant Ownership and Owner role to Member
+ f.index_html.changeOwnership(user)
+ f.index_html.__ac_local_roles__ = None
+ f.index_html.manage_setLocalRoles(member_id, ['Owner'])
f.index_html._setPortalTypeName( 'Document' )