Commit 4384fcac authored by Tres Seaver's avatar Tres Seaver

Forward-port test fix from 2.7 branch.

parent 80c163ad
...@@ -58,6 +58,9 @@ Zope Changes ...@@ -58,6 +58,9 @@ Zope Changes
Bugs fixed Bugs fixed
- Forward ported fix for OFS.CopySupport tests which corrected
signature of a faux security policy's 'validate' method.
- 'setup.py' did not install the 'Zope' compatibility module - 'setup.py' did not install the 'Zope' compatibility module
(the old 'Zope' package has been renamed to 'Zope2'). (the old 'Zope' package has been renamed to 'Zope2').
......
...@@ -281,7 +281,12 @@ class _SensitiveSecurityPolicy: ...@@ -281,7 +281,12 @@ class _SensitiveSecurityPolicy:
self._lambdas = ( validate_lambda, checkPermission_lambda ) self._lambdas = ( validate_lambda, checkPermission_lambda )
def validate( self, *args, **kw ): def validate( self, *args, **kw ):
return self._lambdas[ 0 ]( *args, **kw ) from zExceptions import Unauthorized
allowed = self._lambdas[ 0 ]( *args, **kw )
if not allowed:
raise Unauthorized
return 1
def checkPermission( self, *args, **kw ) : def checkPermission( self, *args, **kw ) :
return self._lambdas[ 1 ]( *args, **kw ) return self._lambdas[ 1 ]( *args, **kw )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment