[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/HTTP - HTTPPublicationTraverse.py:1.1.4.4

Jim Fulton jim@zope.com
Sun, 28 Apr 2002 13:17:14 -0400


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

Modified Files:
      Tag: Zope-3x-branch
	HTTPPublicationTraverse.py 
Log Message:
HOTYB: Merged SecurityProxy-branch into main branch.  

All tests pass and folders can be listed and added through the web.
It is likely that most other things don't work and will need to be
fixed. The reason is that many accesses that should have been checked
before are now being checked and additional checks and thinking about
permissions and security settings are needed.

I'm in the process of drafting a paper for the wiki that describes the
changes in more detail.


=== Zope3/lib/python/Zope/App/ZopePublication/HTTP/HTTPPublicationTraverse.py 1.1.4.3 => 1.1.4.4 ===
 from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
 from Zope.ComponentArchitecture import getRequestView
-from Zope.App.Security.SecurityManagement import getSecurityManager
+from Zope.Security.SecurityManagement import getSecurityManager
 from Zope.Publisher.Exceptions import NotFound
 from types import StringTypes
-from Zope.ContextWrapper import Wrapper
+from Zope.Proxy.ContextWrapper import ContextWrapper
 
 class DuplicateNamespaces(Exception):
     """More than one namespave was specified in a request"""
@@ -105,8 +105,7 @@
 
 
     def _wrap(self, ob, parent, name, nm):
-        wrapped = Wrapper(ob, parent, name=name)
-        getSecurityManager().validate(nm, wrapped)
+        wrapped = ContextWrapper(ob, parent, name=name)
         return wrapped