diff options
| author | Casey Duncan <casey.duncan@gmail.com> | 2010-11-30 19:46:45 -0700 |
|---|---|---|
| committer | Casey Duncan <casey.duncan@gmail.com> | 2010-11-30 19:46:45 -0700 |
| commit | 031d9f20baee7f57534a805809ac6a11319330ce (patch) | |
| tree | 9ab03b9fca24b5542441649eecf287f9e9f48e92 /docs/narr/security.rst | |
| parent | 3f0f1a7c9e0177352023bbe67b1eddf9185d759a (diff) | |
| parent | 5238ae329fb70e5e386db0b127d958c8523d7247 (diff) | |
| download | pyramid-031d9f20baee7f57534a805809ac6a11319330ce.tar.gz pyramid-031d9f20baee7f57534a805809ac6a11319330ce.tar.bz2 pyramid-031d9f20baee7f57534a805809ac6a11319330ce.zip | |
Merge https://github.com/Pylons/pyramid
Diffstat (limited to 'docs/narr/security.rst')
| -rw-r--r-- | docs/narr/security.rst | 12 |
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. """ |
