summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-09-30 03:27:28 +0000
committerChris McDonough <chrism@agendaless.com>2009-09-30 03:27:28 +0000
commitd75fe70228c89e3606e51a4d5775faf549252a90 (patch)
tree043a7334d49a7455b80789f1aab56e4238dbd6b0 /docs
parent4be6ce73f41e09bf0f3e5df01d7f5aaf4f3137a6 (diff)
downloadpyramid-d75fe70228c89e3606e51a4d5775faf549252a90.tar.gz
pyramid-d75fe70228c89e3606e51a4d5775faf549252a90.tar.bz2
pyramid-d75fe70228c89e3606e51a4d5775faf549252a90.zip
- The import of ``repoze.bfg.view.NotFound`` is deprecated in favor of
``repoze.bfg.exceptions.NotFound``. The old location still functions, but emits a deprecation warning. - The import of ``repoze.bfg.security.Unauthorized`` is deprecated in favor of ``repoze.bfg.exceptions.Forbidden``. The old location still functions but emits a deprecation warning. The rename from ``Unauthorized`` to ``Forbidden`` brings parity to the the name of the exception and the system view it invokes when raised. - New ``repoze.bfg.exceptions`` module was created to house exceptions that were previously sprinkled through various modules. - An ``exceptions`` API chapter was added, documenting the new ``repoze.bfg.exceptions`` module.
Diffstat (limited to 'docs')
-rw-r--r--docs/api/exceptions.rst11
-rw-r--r--docs/index.rst1
-rw-r--r--docs/narr/views.rst4
3 files changed, 14 insertions, 2 deletions
diff --git a/docs/api/exceptions.rst b/docs/api/exceptions.rst
new file mode 100644
index 000000000..63a3916ae
--- /dev/null
+++ b/docs/api/exceptions.rst
@@ -0,0 +1,11 @@
+.. _exceptions_module:
+
+:mod:`repoze.bfg.exceptions`
+----------------------------
+
+.. automodule:: repoze.bfg.exceptions
+
+ .. autoclass:: NotFound
+
+ .. autoclass:: Forbidden
+
diff --git a/docs/index.rst b/docs/index.rst
index 6b85f1440..1305104c4 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -57,6 +57,7 @@ Per-module :mod:`repoze.bfg` API documentation.
api/chameleon_text
api/chameleon_zpt
api/events
+ api/exceptions
api/location
api/paster
api/router
diff --git a/docs/narr/views.rst b/docs/narr/views.rst
index 5fe66dc63..b45221e71 100644
--- a/docs/narr/views.rst
+++ b/docs/narr/views.rst
@@ -680,7 +680,7 @@ The value of the ``permission`` attribute represents the permission
that must be possessed by the user to invoke any found view. When a
view is found that matches all predicates, but the invoking user does
not possess the permission implied by any associated ``permission`` in
-the current context, processing stops, and an ``Unauthorized`` error
+the current context, processing stops, and an ``Forbidden`` error
is raised, usually resulting in a "forbidden" view being shown to the
invoking user. No further view narrowing or view lookup is done.
@@ -989,7 +989,7 @@ user does not possess the ``add`` permission relative to the current
.. note::
Packages such as :term:`repoze.who` are capable of intercepting an
- ``Unauthorized`` response and displaying a form that asks a user to
+ ``Forbidden`` response and displaying a form that asks a user to
authenticate. Use this kind of package to ask the user for
authentication credentials.