[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/Browser - Publication.py:1.1.2.8
   
    Jim Fulton
     
    jim@zope.com
       
    Sun, 28 Apr 2002 13:17:14 -0400
    
    
  
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/Browser
In directory cvs.zope.org:/tmp/cvs-serv17050/lib/python/Zope/App/ZopePublication/Browser
Modified Files:
      Tag: Zope-3x-branch
	Publication.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/Browser/Publication.py 1.1.2.7 => 1.1.2.8 ===
 from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
 from Zope.ComponentArchitecture import getRequestView
-from Zope.ContextWrapper import Wrapper
-from Zope.App.Security.SecurityManagement import getSecurityManager
-
+from Zope.Proxy.ContextWrapper import ContextWrapper
+from Zope.Proxy.ProxyIntrospection import removeAllProxies
 
 class BrowserPublication(ZopeHTTPPublication):
     """Web browser publication handling."""
@@ -31,7 +30,7 @@
 
         r = ()
 
-        if IBrowserPublisher.isImplementedBy(ob):
+        if IBrowserPublisher.isImplementedBy(removeAllProxies(ob)):
             r = ob.browserDefault(request)
         else:
             adapter = getRequestView(ob, '_traverse', request , None)
@@ -42,8 +41,7 @@
 
         if r[0] is ob: return r
         
-        wrapped = Wrapper(r[0], ob, name=None)
-        getSecurityManager().validate(None, wrapped)
+        wrapped = ContextWrapper(r[0], ob, name=None)
         return (wrapped, r[1])
 
 # For now, have a factory that returns a singleton