[CMF-checkins] CVS: Products/CMFCore/tests - test_PortalFolder.py:1.39

Tres Seaver tseaver at zope.com
Thu Feb 17 16:27:12 EST 2005


Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv9268/CMFCore/tests

Modified Files:
	test_PortalFolder.py 
Log Message:
 - Port Jim's test fix from Zope 2.7's OFS.tests.testCopySupport.


=== Products/CMFCore/tests/test_PortalFolder.py 1.38 => 1.39 ===
--- Products/CMFCore/tests/test_PortalFolder.py:1.38	Fri Oct 15 13:48:45 2004
+++ Products/CMFCore/tests/test_PortalFolder.py	Thu Feb 17 16:27:11 2005
@@ -24,6 +24,7 @@
 import cStringIO
 
 from AccessControl import SecurityManager
+from AccessControl import Unauthorized
 from Acquisition import aq_base
 from Acquisition import Implicit
 from DateTime import DateTime
@@ -764,7 +765,9 @@
         self._lambdas = ( validate_lambda, checkPermission_lambda )
 
     def validate( self, *args, **kw ):
-        return self._lambdas[ 0 ]( *args, **kw )
+        if self._lambdas[ 0 ]( *args, **kw ):
+            return True
+        raise Unauthorized
 
     def checkPermission( self, *args, **kw ) :
         return self._lambdas[ 1 ]( *args, **kw )



More information about the CMF-checkins mailing list