[Zope-Checkins] CVS: Zope/lib/python/OFS -
ObjectManager.py:1.158.6.5
Zachery Bir
zbir at urbanape.com
Wed Mar 17 19:44:14 EST 2004
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv4166
Modified Files:
Tag: Zope-2_6-branch
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.158.6.4 => 1.158.6.5 ===
--- Zope/lib/python/OFS/ObjectManager.py:1.158.6.4 Wed Mar 17 11:35:51 2004
+++ Zope/lib/python/OFS/ObjectManager.py Wed Mar 17 19:44:13 2004
@@ -266,9 +266,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