[Checkins] SVN: z3c.jbot/trunk/z3c/jbot/utility.py In recent
versions of Five, a Zope 3 security interaction is actually started;
the request is not a participation in this interaction however, so we
still need to acquire it from the site.
Malthe Borch
mborch at gmail.com
Tue Jul 15 08:09:13 EDT 2008
Log message for revision 88377:
In recent versions of Five, a Zope 3 security interaction is actually started; the request is not a participation in this interaction however, so we still need to acquire it from the site.
Changed:
U z3c.jbot/trunk/z3c/jbot/utility.py
-=-
Modified: z3c.jbot/trunk/z3c/jbot/utility.py
===================================================================
--- z3c.jbot/trunk/z3c/jbot/utility.py 2008-07-15 10:29:11 UTC (rev 88376)
+++ z3c.jbot/trunk/z3c/jbot/utility.py 2008-07-15 12:09:12 UTC (rev 88377)
@@ -18,18 +18,18 @@
def getRequest():
try:
i = zope.security.management.getInteraction()
+ for p in i.participations:
+ if IRequest.providedBy(p):
+ return p
except zope.security.interfaces.NoInteraction:
- if ZOPE_2:
- # get request by acquisition
- site = getSite()
- if site is not None:
- return site.REQUEST
- return
-
- for p in i.participations:
- if IRequest.providedBy(p):
- return p
-
+ pass
+
+ if ZOPE_2:
+ # get request by acquisition
+ site = getSite()
+ if site is not None:
+ return site.REQUEST
+
def getLayer():
request = getRequest()
More information about the Checkins
mailing list