[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/AbsoluteURL - AbsoluteURL.py:1.1.2.4.4.3 config.zcml:1.1.2.4.2.3

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


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

Modified Files:
      Tag: Zope3InWonderland-branch
	AbsoluteURL.py config.zcml 
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/ZopePublication/AbsoluteURL/AbsoluteURL.py 1.1.2.4.4.2 => 1.1.2.4.4.3 ===
 from Zope.ComponentArchitecture import getView
 
+from Interface import Interface
+
+class IAbsoluteURL(Interface):
+
+    def __str__():
+        """Get a human-readable string representation
+        """
+
+    def __repr__():
+        """Get a string representation
+        """
+    
+
 class AbsoluteURL(BrowserView):
 
     def __str__(self):


=== Zope3/lib/python/Zope/App/ZopePublication/AbsoluteURL/config.zcml 1.1.2.4.2.2 => 1.1.2.4.2.3 ===
 >
 
-  <content class='.AbsoluteURL.'>
-    <security:require
-        permission='Zope.Public' />
-  </content>
-
   <browser:view 
       name="absolute_url"
       factory=".AbsoluteURL." 
+      permission='Zope.Public'
+      allowed_interface=".AbsoluteURL.IAbsoluteURL"     
   />
-
-  <content class='.AbsoluteURL.SiteAbsoluteURL'>
-    <security:require
-        permission='Zope.Public'/>
-  </content>
   
   <browser:view 
       for="Zope.App.OFS.Content.Folder.RootFolder.IRootFolder"
       name="absolute_url"
       factory=".AbsoluteURL.SiteAbsoluteURL" 
+      permission='Zope.Public'
+      allowed_interface=".AbsoluteURL.IAbsoluteURL"     
   />
 
 </zopeConfigure>