Commit ace47b97 authored by matt@zope.com's avatar matt@zope.com

Route user object wrap change to trunk

parent 288d5bdf
...@@ -53,6 +53,9 @@ Zope Changes ...@@ -53,6 +53,9 @@ Zope Changes
- Collector #250: applied several patches for TextIndex for better - Collector #250: applied several patches for TextIndex for better
unicode support for the GlobbingLexicon unicode support for the GlobbingLexicon
- Collector #254: user object was being returned without wrapping
context
Zope 2.5.1 beta 1 Zope 2.5.1 beta 1
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
"""Access control package""" """Access control package"""
__version__='$Revision: 1.166 $'[11:-2] __version__='$Revision: 1.167 $'[11:-2]
import Globals, socket, SpecialUsers,re import Globals, socket, SpecialUsers,re
import os import os
...@@ -487,7 +487,11 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager, ...@@ -487,7 +487,11 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
def getUserById(self, id, default=_marker): def getUserById(self, id, default=_marker):
"""Return the user corresponding to the given id. """Return the user corresponding to the given id.
""" """
try: return self.getUser(id) # The connection between getting by ID and by name is not a strong
# one
try:
result=self.getUser(id)
return result.__of__(self) # Wrap in our context
except: except:
if default is _marker: raise if default is _marker: raise
return default return default
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment