[ZCM] [ZC] 1306/ 2 Resolve "Missing acqisition context on local roles screen "
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Mon, 02 Jul 2007 06:17:40 -0400
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #1306 Update (Resolve) "Missing acqisition context on local roles screen "
Status Resolved, Zope/bug+solution medium
To followup, visit:
http://www.zope.org/Collectors/Zope/1306
==============================================================
= Resolve - Entry #2 by shh on Jul 2, 2007 6:17 am
Status: Pending => Resolved
Three years without objections means "go", I guess...
________________________________________
= Request - Entry #1 by shh on Apr 29, 2004 5:15 pm
RoleManager.get_valid_userids() calls user_names() on an unwrapped user folder. This make the local role screens unusable for e.g. database user folders that need to acquire their DB connector.
The following patch wraps user_names() before calling it. If there are no security implications I failed to spot, I'd like to check this is in.
--- Role.py Thu Jul 24 18:08:43 2003
+++ Role.py Thu Jul 24 18:08:49 2003
@@ -314,11 +314,12 @@
if mlu < 0: raise OverflowError
un = getattr(aclu, 'user_names', _notfound)
if un is not _notfound:
+ un = aclu.__of__(item).user_names # rewrap
unl = un()
# maxlistusers of 0 is list all
if len(unl) > mlu and mlu != 0:
raise OverflowError
- for name in un():
+ for name in unl:
dict[name]=1
item = getattr(item, 'aq_parent', _notfound)
if item is _notfound:
==============================================================