[CMF-checkins] CVS: CMF/CMFStaging - StagingTool.py:1.22

Sidnei da Silva sidnei at awkly.org
Tue Apr 13 18:09:07 EDT 2004


Update of /cvs-repository/CMF/CMFStaging
In directory cvs.zope.org:/tmp/cvs-serv4409

Modified Files:
	StagingTool.py 
Log Message:
Avoid unwanted (IMHO) acquisition behavior


=== CMF/CMFStaging/StagingTool.py 1.21 => 1.22 ===
--- CMF/CMFStaging/StagingTool.py:1.21	Sun Apr  4 20:25:59 2004
+++ CMF/CMFStaging/StagingTool.py	Tue Apr 13 18:09:06 2004
@@ -124,6 +124,12 @@
             stage = stages[stage_name]
             if stage is not None:
                 obj = stage.restrictedTraverse(rel_path, None)
+                if obj is not None and not obj.aq_inContextOf(stage, 1):
+                    # Avoid dangerous acquisition. Eg: acquiring
+                    # stuff from portal_skins or from above the stage
+                    # and being unable to stage an object with the same
+                    # id because the acquired object is non-versionable.
+                    obj = None
             else:
                 obj = None
             res[stage_name] = obj




More information about the CMF-checkins mailing list