[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI - ZMIViewUtility.py:1.1.2.5.2.1
Stephan Richter
srichter@cbu.edu
Mon, 4 Mar 2002 01:18:39 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZMI
In directory cvs.zope.org:/tmp/cvs-serv32648/lib/python/Zope/App/ZMI
Modified Files:
Tag: srichter-OFS_Formulator-branch
ZMIViewUtility.py
Log Message:
- Simple setup (ZCML) changes of files.
- Various other little things
=== Zope3/lib/python/Zope/App/ZMI/ZMIViewUtility.py 1.1.2.5 => 1.1.2.5.2.1 ===
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
from Zope.ComponentArchitecture import getService
-from Zope.App.ZopePublication.PublicationTraverse \
- import PublicationTraverser
+from Zope.App.ZopePublication.Browser.BrowserPublicationTraverse \
+ import BrowserPublicationTraverser
from Zope.Exceptions import Unauthorized
class ZMIViewUtility(ContextDependent):
@@ -34,7 +34,11 @@
context = self.getContext()
zmi_view_service = getService(context, 'ZMIViewService')
zmi_views=[]
- traverser = PublicationTraverser()
+ # Note: In this case browser-specific code is okay, since it is
+ # merely used for permissions.
+ # XXX Mmmh, maybe not. What if XMLRPC is forbidden, but Browser
+ # allows it? This should be another mechanism.
+ traverser = BrowserPublicationTraverser()
for view in zmi_view_service.getViews(context):
label=view[0]
action=view[1]