From c03dbcca24aeedfb688bf49b7ccfeef20f6f8298 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 25 Oct 2010 18:13:44 -0400 Subject: convert zcml docs to Pyramid --- docs/zcml/forbidden.rst | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'docs/zcml/forbidden.rst') diff --git a/docs/zcml/forbidden.rst b/docs/zcml/forbidden.rst index 5a52a05ab..ca5b2cca1 100644 --- a/docs/zcml/forbidden.rst +++ b/docs/zcml/forbidden.rst @@ -3,7 +3,7 @@ ``forbidden`` ------------- -When :mod:`repoze.bfg` can't authorize execution of a view based on +When :mod:`pyramid` can't authorize execution of a view based on the :term:`authorization policy` in use, it invokes a :term:`forbidden view`. The default forbidden response has a 401 status code and is very plain, but it can be overridden as necessary using the @@ -11,10 +11,10 @@ very plain, but it can be overridden as necessary using the .. warning:: - The ``forbidden`` ZCML directive is deprecated in :mod:`repoze.bfg` + The ``forbidden`` ZCML directive is deprecated in :mod:`pyramid` version 1.3. Instead, you should use the :ref:`view_directive` directive with a ``context`` that names the - :exc:`repoze.bfg.exceptions.Forbidden` class. See + :exc:`pyramid.exceptions.Forbidden` class. See :ref:`changing_the_forbidden_view` form more information. Attributes @@ -33,8 +33,6 @@ Attributes :ref:`view_directive`; see the description of ``attr`` there). - .. note:: This feature is new as of :mod:`repoze.bfg` 1.1. - ``renderer`` This is either a single string term (e.g. ``json``) or a string implying a path or :term:`resource specification` @@ -43,8 +41,6 @@ Attributes it would in the context of :ref:`view_directive`; see the description of ``renderer`` there). - .. note:: This feature is new as of :mod:`repoze.bfg` 1.1. - ``wrapper`` The :term:`view name` (*not* an object dotted name) of another view declared elsewhere in ZCML (or via the ``@bfg_view`` decorator) @@ -57,8 +53,6 @@ Attributes *should not* be protected by any permission; behavior is undefined if it does. - .. note:: This feature is new as of :mod:`repoze.bfg` 1.1. - Example ~~~~~~~ @@ -72,11 +66,11 @@ Alternatives ~~~~~~~~~~~~ Use the :ref:`view_directive` directive with a ``context`` that names -the :exc:`repoze.bfg.exceptions.Forbidden` class. +the :exc:`pyramid.exceptions.Forbidden` class. -Use the :meth:`repoze.bfg.configuration.Configurator.add_view` method, +Use the :meth:`pyramid.configuration.Configurator.add_view` method, passing it a ``context`` which is the -:exc:`repoze.bfg.exceptions.Forbidden` class. +:exc:`pyramid.exceptions.Forbidden` class. See Also ~~~~~~~~ -- cgit v1.2.3