From b3255290e96d2b9551516c8f8306ee787adf8fb6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 10 Apr 2011 16:03:07 -0400 Subject: - It is now possible to get information about why Pyramid raised a Forbidden exception from within an exception view. The ``ACLDenied`` object returned by the ``permits`` method of each stock authorization policy (``pyramid.interfaces.IAuthorizationPolicy.permits``) is now attached to the Forbidden exception as its ``result`` attribute. Therefore, if you've created a Forbidden exception view, you can see the ACE, ACL, permission, and principals involved in the request as eg. ``context.result.permission``, ``context.result.acl``, etc within the logic of the Forbidden exception view. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c1a413642..d0cda2f39 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -33,6 +33,16 @@ Features - An exception raised by a NewRequest event subscriber can now be caught by an exception view. +- It is now possible to get information about why Pyramid raised a Forbidden + exception from within an exception view. The ``ACLDenied`` object returned + by the ``permits`` method of each stock authorization policy + (``pyramid.interfaces.IAuthorizationPolicy.permits``) is now attached to + the Forbidden exception as its ``result`` attribute. Therefore, if you've + created a Forbidden exception view, you can see the ACE, ACL, permission, + and principals involved in the request as + eg. ``context.result.permission``, ``context.result.acl``, etc within the + logic of the Forbidden exception view. + Bug Fixes --------- -- cgit v1.2.3