summaryrefslogtreecommitdiff
path: root/docs/narr/security.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-12-01 19:33:06 -0500
committerChris McDonough <chrism@plope.com>2010-12-01 19:33:06 -0500
commitf1ffaeeff438aa2ea768c508fe38e3dd108b9369 (patch)
tree6ff2b0d0063be11ef0b3fa65232a37f629331165 /docs/narr/security.rst
parentd195074f2c6ef704926cf56de4e26e36e11ee758 (diff)
parent1220f3b8f869e4caf298d9acb5e5fffe0a86129e (diff)
downloadpyramid-f1ffaeeff438aa2ea768c508fe38e3dd108b9369.tar.gz
pyramid-f1ffaeeff438aa2ea768c508fe38e3dd108b9369.tar.bz2
pyramid-f1ffaeeff438aa2ea768c508fe38e3dd108b9369.zip
Merge branch 'master' into twophase
Diffstat (limited to 'docs/narr/security.rst')
-rw-r--r--docs/narr/security.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/narr/security.rst b/docs/narr/security.rst
index 8cf459880..2c696772a 100644
--- a/docs/narr/security.rst
+++ b/docs/narr/security.rst
@@ -436,6 +436,7 @@ authorization policy is in effect might look like so:
the following:
.. code-block:: python
+ :linenos:
from pyramid.security import ALL_PERMISSIONS
__acl__ = [ (Deny, Everyone, ALL_PERMISSIONS) ]
@@ -497,7 +498,9 @@ Debugging View Authorization Failures
If your application in your judgment is allowing or denying view
access inappropriately, start your application under a shell using the
``BFG_DEBUG_AUTHORIZATION`` environment variable set to ``1``. For
-example::
+example:
+
+.. code-block:: text
$ BFG_DEBUG_AUTHORIZATION=1 bin/paster serve myproject.ini
@@ -508,7 +511,10 @@ authentication information.
This behavior can also be turned on in the application ``.ini`` file
by setting the ``debug_authorization`` key to ``true`` within the
-application's configuration section, e.g.::
+application's configuration section, e.g.:
+
+.. code-block:: ini
+ :linenos:
[app:main]
use = egg:MyProject#app
@@ -551,6 +557,7 @@ authenticate. Doing so is a matter of creating an instance of something
that implements the following interface:
.. code-block:: python
+ :linenos:
class AuthenticationPolicy(object):
""" An object representing a Pyramid authentication policy. """
@@ -606,6 +613,7 @@ matter of creating an instance of an object that implements the
following interface:
.. code-block:: python
+ :linenos:
class IAuthorizationPolicy(object):
""" An object representing a Pyramid authorization policy. """