[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI/Views/Browser - GenericCreatorView.py:1.1.4.3 browser.zcml:1.1.4.2

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


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

Modified Files:
      Tag: Zope-3x-branch
	GenericCreatorView.py browser.zcml 
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/ZMI/Views/Browser/GenericCreatorView.py 1.1.4.2 => 1.1.4.3 ===
 from Zope.PageTemplate import PageTemplateFile
 from Zope.App.ZMI.IGenericCreatorMarker import IGenericCreatorMarker
-from Zope.ContextWrapper import getcontext
+from Zope.Proxy.ContextWrapper import getWrapperContext
 from Zope.App.OFS.Container.Exceptions import DuplicateIDError
 from Zope.ComponentArchitecture import createObject
 
@@ -41,7 +41,7 @@
         in _context) within the container that is the parent of the
         Addable"""
         addable=self.getContext()
-        container=getcontext(addable)
+        container=getWrapperContext(addable)
         
         if name in container.objectIds():
             raise DuplicateIDError, "ID '%s' already in use." % name


=== Zope3/lib/python/Zope/App/ZMI/Views/Browser/browser.zcml 1.1.4.1 => 1.1.4.2 ===
   <security:protectClass name=".GenericCreatorView."
                        permission_id="Zope.View"
-                       methods="index, action" />
+                       names="index, action" />
                        
 </zopeConfigure>