From ff1213e8f2aed987108ba57aed517c033491b1aa Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 14 Apr 2010 02:49:19 +0000 Subject: Add "exception views" work contributed primarily by Andrey Popp by merging the "phash" branch. --- repoze/bfg/security.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'repoze/bfg/security.py') diff --git a/repoze/bfg/security.py b/repoze/bfg/security.py index 822fd9ee7..cd1bae9a5 100644 --- a/repoze/bfg/security.py +++ b/repoze/bfg/security.py @@ -5,6 +5,7 @@ from zope.deprecation import deprecated from repoze.bfg.interfaces import IAuthenticationPolicy from repoze.bfg.interfaces import IAuthorizationPolicy from repoze.bfg.interfaces import ISecuredView +from repoze.bfg.interfaces import IViewClassifier from repoze.bfg.exceptions import Forbidden as Unauthorized # b/c import from repoze.bfg.threadlocal import get_current_registry @@ -122,7 +123,7 @@ def view_execution_permitted(context, request, name=''): reg = request.registry except AttributeError: reg = get_current_registry() # b/c - provides = map(providedBy, (request, context)) + provides = [IViewClassifier] + map(providedBy, (request, context)) view = reg.adapters.lookup(provides, ISecuredView, name=name) if view is None: return Allowed( -- cgit v1.2.3