Chris McDonough
2011-04-10 b3255290e96d2b9551516c8f8306ee787adf8fb6
refs
author Chris McDonough <chrism@plope.com>
Sunday, April 10, 2011 22:03 +0200
committer Chris McDonough <chrism@plope.com>
Sunday, April 10, 2011 22:03 +0200
commitb3255290e96d2b9551516c8f8306ee787adf8fb6
tree 7671d60fa68202d8b1e99d7516e3522b8a9b13fb tree | zip | gz
parent 4d1602230db7b1274fd7fff43764c46a6e52b83b view | diff
- 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.
1 files added
6 files modified
133 ■■■■ changed files
CHANGES.txt 10 ●●●●● diff | view | raw | blame | history
TODO.txt 3 ●●●●● diff | view | raw | blame | history
pyramid/config.py 16 ●●●● diff | view | raw | blame | history
pyramid/exceptions.py 36 ●●●●● diff | view | raw | blame | history
pyramid/security.py 28 ●●●● diff | view | raw | blame | history
pyramid/tests/forbiddenapp/__init__.py 25 ●●●●● diff | view | raw | blame | history
pyramid/tests/test_integration.py 15 ●●●●● diff | view | raw | blame | history