[Zope-Checkins] CVS: Zope/lib/python/OFS -
ObjectManager.py:1.163.12.7
Zachery Bir
zbir at urbanape.com
Wed Mar 17 17:48:10 EST 2004
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv11858
Modified Files:
Tag: Zope-2_7-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.163.12.6 => 1.163.12.7 ===
--- Zope/lib/python/OFS/ObjectManager.py:1.163.12.6 Wed Mar 17 10:22:15 2004
+++ Zope/lib/python/OFS/ObjectManager.py Wed Mar 17 17:48:10 2004
@@ -270,9 +270,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