Browse files

Improved the Authorization chapter

- Added a summary of the steps
- Fixed a couple of typos
  • Loading branch information...
1 parent fa28ae6 commit 3924d1c6565d4c9b7e25e01ccd46a45c1a12a3b1 @ppaez ppaez committed with reedobrien Mar 13, 2012
Showing with 15 additions and 10 deletions.
  1. +15 −10 docs/tutorials/wiki2/authorization.rst
25 docs/tutorials/wiki2/authorization.rst
@@ -12,14 +12,19 @@ application to allow only people whom possess a specific username (`editor`)
to add and edit wiki pages but we'll continue allowing anyone with access to
the server to view pages.
-To do so, we'll add an :term:`authentication policy` and an
-:term:`authorization policy`. We'll also add a ```` module,
-create a :term:`root factory` with an :term:`ACL`, and add :term:`permission`
-declarations to the ``edit_page`` and ``add_page`` views. Then we'll add
-``login`` and ``logout`` views, and modify the existing views to make them
-return a ``logged_in`` flag to the renderer. Finally, we will add a
-```` template and change the existing ```` and ```` to
-show a "Logout" link when not logged in.
+We will do the following steps:
+* Add a :term:`root factory` with an :term:`ACL` (````).
+* Add an :term:`authentication policy` and an :term:`authorization policy`
+ (````).
+* Add an authentication policy callback (new ```` module).
+* Add :term:`permission` declarations to the ``edit_page`` and ``add_page``
+ views (````).
+* Add ``login`` and ``logout`` views (````).
+* Make the existing views return a ``logged_in`` flag to the renderer (````).
+* Add a login template (new ````).
+* Add a "Logout" link to be shown when logged in and viewing or editing a page
+ (````, ````).
The source code for this tutorial stage can be browsed at
@@ -98,7 +103,7 @@ Then, we'll add those policies to the configuration:
:language: python
-Note that that the
+Note that the
:class:`pyramid.authentication.AuthTktAuthenticationPolicy` constructor
accepts two arguments: ``secret`` and ``callback``. ``secret`` is a string
representing an encryption key used by the "authentication ticket" machinery
@@ -248,7 +253,7 @@ Adding the ```` Template
Add a ```` template to your templates directory. It's
-referred to within the login view we just added to ````.
+referred to within the login view we just added to ````.
.. literalinclude:: src/authorization/tutorial/templates/
:language: xml

0 comments on commit 3924d1c

Please sign in to comment.