[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/copypastemove/ Merged from ZopeX3-3.0 branch:

Jim Fulton jim at zope.com
Fri Aug 13 16:38:06 EDT 2004


Log message for revision 27134:
  Merged from ZopeX3-3.0 branch:
  
    r27119 | jim | 2004-08-13 14:06:50 -0400 (Fri, 13 Aug 2004) | 6 lines
  
  Removed some uses of removeAllProxies.
  
  One of these was unnecessary.  The others were removed using trusted
  adapters.
  


Changed:
  U   Zope3/trunk/src/zope/app/copypastemove/__init__.py
  U   Zope3/trunk/src/zope/app/copypastemove/configure.zcml


-=-
Modified: Zope3/trunk/src/zope/app/copypastemove/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/copypastemove/__init__.py	2004-08-13 20:32:40 UTC (rev 27133)
+++ Zope3/trunk/src/zope/app/copypastemove/__init__.py	2004-08-13 20:38:06 UTC (rev 27134)
@@ -19,7 +19,6 @@
 
 from zope.interface import implements, Invalid
 from zope.exceptions import NotFoundError, DuplicationError
-from zope.proxy import removeAllProxies
 
 from zope.app import zapi
 from zope.app.container.sample import SampleContainer
@@ -185,9 +184,6 @@
         chooser = INameChooser(target)
         new_name = chooser.chooseName(new_name, obj)
 
-        # Can't store security proxies
-        obj = removeAllProxies(obj)
-
         target[new_name] = obj
         del container[orig_name]
 
@@ -374,8 +370,7 @@
         chooser = INameChooser(target)
         new_name = chooser.chooseName(new_name, obj)
 
-        copy = removeAllProxies(obj)
-        copy = locationCopy(copy)
+        copy = locationCopy(obj)
         self._configureCopy(copy, target, new_name)
         notify(ObjectCopiedEvent(copy))
 
@@ -440,7 +435,7 @@
 
     def getContents(self):
         '''Return the contents of the clipboard'''
-        return removeAllProxies(self.context.get('clipboard', ()))
+        return self.context.get('clipboard', ())
 
 
 def rename(container, oldid, newid):

Modified: Zope3/trunk/src/zope/app/copypastemove/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/copypastemove/configure.zcml	2004-08-13 20:32:40 UTC (rev 27133)
+++ Zope3/trunk/src/zope/app/copypastemove/configure.zcml	2004-08-13 20:38:06 UTC (rev 27134)
@@ -9,6 +9,7 @@
       provides="zope.app.copypastemove.interfaces.IObjectMover"
       permission="zope.ManageContent"
       for="*"
+      trusted="y"
       />
 
   <adapter
@@ -16,6 +17,7 @@
       provides="zope.app.copypastemove.interfaces.IObjectCopier"
       permission="zope.ManageContent"
       for="*"
+      trusted="y"
       />
 
   <adapter



More information about the Zope3-Checkins mailing list