[CMF-checkins] CVS: CMF/CMFDefault - MembershipTool.py:1.45

Florent Guillaume fg at nuxeo.com
Fri Feb 13 10:22:48 EST 2004


Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv3284

Modified Files:
	MembershipTool.py 
Log Message:
Use _getOb instead of getattr to make sur we don't acquire the home folder.


=== CMF/CMFDefault/MembershipTool.py 1.44 => 1.45 ===
--- CMF/CMFDefault/MembershipTool.py:1.44	Tue Feb 10 16:02:09 2004
+++ CMF/CMFDefault/MembershipTool.py	Fri Feb 13 10:22:47 2004
@@ -231,7 +231,7 @@
         # Create Member's home folder.
         members.manage_addPortalFolder(id=member_id,
                                        title="%s's Home" % member_id)
-        f = getattr(members, member_id)
+        f = members._getOb(member_id)
 
         # Grant Ownership and Owner role to Member
         f.changeOwnership(member)
@@ -275,12 +275,14 @@
             id = member.getMemberId()
         members = self.getMembersFolder()
         if members:
-            if hasattr(aq_base(members), id):
-                folder = getattr(members, id)
+            try:
+                folder = members._getOb(id)
                 if verifyPermission and not _checkPermission(View, folder):
                     # Don't return the folder if the user can't get to it.
                     return None
                 return folder
+            except AttributeError:
+                pass
         return None
 
     def getHomeUrl(self, id=None, verifyPermission=0):




More information about the CMF-checkins mailing list