[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/service -
__init__.py:1.8
Philipp von Weitershausen
cvs-admin at zope.org
Fri Dec 5 09:42:31 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/services/service
In directory cvs.zope.org:/tmp/cvs-serv23148/browser/services/service
Modified Files:
__init__.py
Log Message:
Changed Jim's fix. We now remove the proxies in the view. The SiteManager
really shouldn't bother about unproxying objects.
Also, whitespace and style updates.
=== Zope3/src/zope/app/browser/services/service/__init__.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/services/service/__init__.py:1.7 Fri Nov 21 12:11:21 2003
+++ Zope3/src/zope/app/browser/services/service/__init__.py Fri Dec 5 09:42:00 2003
@@ -16,6 +16,8 @@
$Id$
"""
+from zope.proxy import removeAllProxies
+
from zope.app import zapi
from zope.app.browser.container.adding import Adding
from zope.app.i18n import ZopeMessageIDFactory as _
@@ -388,6 +390,11 @@
"""
if ISite.isImplementedBy(self.context):
raise zapi.UserError('This is already a site')
- sm = ServiceManager(self.context)
+
+ # we don't want to store security proxies (we can't,
+ # actually), so we have to remove proxies here before passing
+ # the context to the ServiceManager.
+ bare = removeAllProxies(self.context)
+ sm = ServiceManager(bare)
self.context.setSiteManager(sm)
self.request.response.redirect("++etc++site/")
More information about the Zope3-Checkins
mailing list