diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-04-14 02:49:19 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-04-14 02:49:19 +0000 |
| commit | ff1213e8f2aed987108ba57aed517c033491b1aa (patch) | |
| tree | f531544c3373ae7d5b51746987cb373326277a9c /docs/tutorials | |
| parent | 2b6bc8adfa294f7133680f64df411251afb67dfc (diff) | |
| download | pyramid-ff1213e8f2aed987108ba57aed517c033491b1aa.tar.gz pyramid-ff1213e8f2aed987108ba57aed517c033491b1aa.tar.bz2 pyramid-ff1213e8f2aed987108ba57aed517c033491b1aa.zip | |
Add "exception views" work contributed primarily by Andrey Popp by merging the "phash" branch.
Diffstat (limited to 'docs/tutorials')
4 files changed, 10 insertions, 8 deletions
diff --git a/docs/tutorials/bfgwiki/authorization.rst b/docs/tutorials/bfgwiki/authorization.rst index 1b83d3651..8c2ab1df9 100644 --- a/docs/tutorials/bfgwiki/authorization.rst +++ b/docs/tutorials/bfgwiki/authorization.rst @@ -27,7 +27,7 @@ Changing ``configure.zcml`` We'll change our ``configure.zcml`` file to enable an ``AuthTktAuthenticationPolicy`` and an ``ACLAuthorizationPolicy`` to -enable declarative security checking. We'll also add a ``forbidden`` +enable declarative security checking. We'll also add a new view stanza, which species a :term:`forbidden view`. This configures our login view to show up when :mod:`repoze.bfg` detects that a view invocation can not be authorized. When you're done, your diff --git a/docs/tutorials/bfgwiki/src/authorization/tutorial/configure.zcml b/docs/tutorials/bfgwiki/src/authorization/tutorial/configure.zcml index 837c04089..5297b9ee3 100644 --- a/docs/tutorials/bfgwiki/src/authorization/tutorial/configure.zcml +++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/configure.zcml @@ -5,9 +5,10 @@ <scan package="."/> - <forbidden + <view view=".login.login" - renderer="templates/login.pt"/> + renderer="templates/login.pt" + context="repoze.bfg.exceptions.Forbidden"/> <authtktauthenticationpolicy secret="sosecret" diff --git a/docs/tutorials/bfgwiki2/authorization.rst b/docs/tutorials/bfgwiki2/authorization.rst index 9a37760f1..2f1a9e082 100644 --- a/docs/tutorials/bfgwiki2/authorization.rst +++ b/docs/tutorials/bfgwiki2/authorization.rst @@ -84,9 +84,9 @@ Changing ``configure.zcml`` We'll change our ``configure.zcml`` file to enable an ``AuthTktAuthenticationPolicy`` and an ``ACLAuthorizationPolicy`` to enable declarative security checking. We'll also change -``configure.zcml`` to add a ``forbidden`` stanza which points at our -``login`` :term:`view callable`, also known as a :term:`forbidden -view`. This configures our newly created login view to show up when +``configure.zcml`` to add a view stanza which points at our ``login`` +:term:`view callable`, also known as a :term:`forbidden view`. This +configures our newly created login view to show up when :mod:`repoze.bfg` detects that a view invocation can not be authorized. Also, we'll add ``view_permission`` attributes with the value ``edit`` to the ``edit_page`` and ``add_page`` route diff --git a/docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml b/docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml index 564cb7443..018892cd1 100644 --- a/docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml +++ b/docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml @@ -53,9 +53,10 @@ view_permission="edit" /> - <forbidden + <view view=".login.login" - renderer="templates/login.pt"/> + renderer="templates/login.pt" + for="repoze.bfg.exceptions.Forbidden"/> <authtktauthenticationpolicy secret="sosecret" |
