[Zope-Checkins] CVS: Zope/lib/python/OFS - ObjectManager.py:1.172
Zachery Bir
zbir at urbanape.com
Wed Mar 17 18:51:24 EST 2004
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv22747
Modified Files:
ObjectManager.py
Log Message:
The key for 'Owner' local role should be the user's Id, not UserName
Special Users and security managers that return None objects should not play.
=== Zope/lib/python/OFS/ObjectManager.py 1.171 => 1.172 ===
--- Zope/lib/python/OFS/ObjectManager.py:1.171 Wed Mar 17 11:34:26 2004
+++ Zope/lib/python/OFS/ObjectManager.py Wed Mar 17 18:51:23 2004
@@ -271,9 +271,9 @@
if object.__ac_local_roles__ is None:
user=getSecurityManager().getUser()
if user is not None:
- name=user.getUserName()
- if name != 'Anonymous User':
- object.manage_setLocalRoles(name, ['Owner'])
+ userid=user.getId()
+ if userid is not None:
+ object.manage_setLocalRoles(userid, ['Owner'])
object.manage_afterAdd(object, self)
return id
More information about the Zope-Checkins
mailing list