[Zope3-checkins] CVS: Zope3/src/zope/app/services - event.py:1.34
Jim Fulton
jim@zope.com
Mon, 14 Jul 2003 07:07:28 -0400
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv17084/src/zope/app/services
Modified Files:
event.py
Log Message:
Added logic to remove security proxies when calling subscribers
registered via hub id. (We were already doing so for subscribers
registered by path.) For now, we don't have untrusted code
subscribing subscribers.
=== Zope3/src/zope/app/services/event.py 1.33 => 1.34 ===
--- Zope3/src/zope/app/services/event.py:1.33 Tue Jun 24 18:37:24 2003
+++ Zope3/src/zope/app/services/event.py Mon Jul 14 07:07:22 2003
@@ -38,6 +38,8 @@
from zope.app.event.subs import Subscribable, SubscriptionTracker
+from zope.security.proxy import trustedRemoveSecurityProxy
+
import logging
def getSubscriptionService(context):
@@ -105,6 +107,11 @@
if isinstance(subscriber, int):
try:
obj = hubGet(subscriber)
+
+ # XXX we need to figure out exactly how we want to
+ # handle this. For now, we'll assume that all
+ # subscriptions are trusted, so can always notify
+ obj = trustedRemoveSecurityProxy(obj)
except NotFoundError:
badSubscribers[subscriber] = None
continue