[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI - ZMIViewUtility.py:1.1.2.7

Gary Poster garyposter@earthlink.net
Thu, 2 May 2002 13:17:51 -0400


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

Modified Files:
      Tag: Zope-3x-branch
	ZMIViewUtility.py 
Log Message:
Several interfaces divided up into readers (getters) and writers (setters), then used in the zcml for permissions.  Some small changes in the local ServiceManager to deal with the new security a bit better, hopefully.  Fixed Image enough so that you can upload one, but I'm getting a server buffer error when I try to view it.  The change to ZMIViewUtility I'm not sure of, but it made sense to me.

You can now add, edit, and view significantly more of the content since the security changes.



=== Zope3/lib/python/Zope/App/ZMI/ZMIViewUtility.py 1.1.2.6 => 1.1.2.7 ===
             label=view[0]
             action=view[1]
-            try:
-                traverser.traversePath(self.__request, context, action)
-            except Unauthorized:
-                pass # Skip unauthorized
-            else:
-                zmi_views.append({'label': label, 'action': "../%s" % action})
+            if action:
+                try:
+                    traverser.traversePath(self.__request, context, action)
+                except Unauthorized:
+                    continue # Skip unauthorized
+            zmi_views.append({'label': label, 'action': "../%s" % action})
 
         return zmi_views