[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/copypastemove/ Removed some uses of removeAllProxies.

Jim Fulton jim at zope.com
Fri Aug 13 14:06:50 EDT 2004


Log message for revision 27119:
  Removed some uses of removeAllProxies.
  
  One of these was unnecessary.  The others were removed using trusted
  adapters.
  
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/copypastemove/__init__.py
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/copypastemove/configure.zcml


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/copypastemove/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/copypastemove/__init__.py	2004-08-13 18:04:39 UTC (rev 27118)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/copypastemove/__init__.py	2004-08-13 18:06:50 UTC (rev 27119)
@@ -17,7 +17,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
@@ -183,9 +182,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]
 
@@ -372,8 +368,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))
 
@@ -438,7 +433,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/branches/ZopeX3-3.0/src/zope/app/copypastemove/configure.zcml
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/copypastemove/configure.zcml	2004-08-13 18:04:39 UTC (rev 27118)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/copypastemove/configure.zcml	2004-08-13 18:06:50 UTC (rev 27119)
@@ -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