Commit 75bca269 authored by Tres Seaver's avatar Tres Seaver

Forward-port test fix from 2.7 branch.

parent e754e3b0
......@@ -281,7 +281,12 @@ class _SensitiveSecurityPolicy:
self._lambdas = ( validate_lambda, checkPermission_lambda )
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 ) :
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