[Zope-CVS] CVS: Products/ExternalEditor - CHANGES.txt:1.5 ExternalEditor.py:1.3

Casey Duncan casey@zope.com
Fri, 24 May 2002 17:44:55 -0400


Update of /cvs-repository/Products/ExternalEditor
In directory cvs.zope.org:/tmp/cvs-serv21472

Modified Files:
	CHANGES.txt ExternalEditor.py 
Log Message:
Added Jim Washington's fix for editing ZClass method objects


=== Products/ExternalEditor/CHANGES.txt 1.4 => 1.5 ===
 
+    - Made it possible to edit objects that are methods of ZClasses. Thanks to
+      Jim Washington
+
+    - Refactored link generation code in manage_main so that it uses
+      the parent's absolute_url rather than URL1. Thanks to
+      Jim Washington
+
     - Removed implicit save in Configuration class destructor
 
     - Added caching headers to prevent client-side caching of edit data.


=== Products/ExternalEditor/ExternalEditor.py 1.2 => 1.3 ===
         
         security = getSecurityManager()
-        ob = getattr(self.aq_parent, REQUEST['target'])
+        parent = self.aq_parent
+        try:
+            ob = parent[REQUEST['target']]
+        except AttributeError:
+            # Handle objects that are methods in ZClasses
+            ob = parent.propertysheets.methods[REQUEST['target']]
         
         if not security.checkPermission('View management screen', ob):
             raise 'Unauthorized'