[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI - ZMIViewUtility.py:1.1.2.7.8.3 zmi.zcml:1.1.2.9.2.3 StandardMacros.py:NONE

Jim Fulton jim@zope.com
Wed, 5 Jun 2002 11:18:33 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZMI
In directory cvs.zope.org:/tmp/cvs-serv20512/lib/python/Zope/App/ZMI

Modified Files:
      Tag: Zope3InWonderland-branch
	ZMIViewUtility.py zmi.zcml 
Removed Files:
      Tag: Zope3InWonderland-branch
	StandardMacros.py 
Log Message:
Fixed up zcml and pt to reflect new way of defining views.
This changed lots of urls. Also made sure that relative urls
starting with names with :: had a preceeding "./".  :-/

Had to modify some py files to accomidate these changes, including
createing some interfaces to use in security assertions.



=== Zope3/lib/python/Zope/App/ZMI/ZMIViewUtility.py 1.1.2.7.8.2 => 1.1.2.7.8.3 ===
 from Zope.Exceptions import Unauthorized
 
+from Interface import Interface
+
+class IZMIViewUtility(Interface):
+    def getZMIViews():
+        """Get available view information
+
+        Return a sequence of dictionaries with view labels and
+        actions, where actions are relative URLs.
+        """
+
 
 class ZMIViewUtility(BrowserView):
 


=== Zope3/lib/python/Zope/App/ZMI/zmi.zcml 1.1.2.9.2.2 => 1.1.2.9.2.3 ===
 
   <browser:view name="standard_macros"
-                factory=".StandardMacros." />
+                permission="Zope.View"
+                template="www/standard_macros.pt" />
 
   <browser:view name="ZMIUtility"
+                permission="Zope.View"
+                allowed_interface=".ZMIViewUtility.IZMIViewUtility"
                 factory=".ZMIViewUtility." />
-
-  <content class=".StandardMacros.">
-    <security:require
-        permission="Zope.View" />
-  </content>
-  
-  <content class=".ZMIViewUtility.">
-    <security:require
-        permission="Zope.View"
-        attributes="getZMIViews" />
-  </content>
   
   <content class=".IGenericCreatorMarker.">
     <security:require  

=== Removed File Zope3/lib/python/Zope/App/ZMI/StandardMacros.py ===