diff options
| author | Blaise Laflamme <blaise@laflamme.org> | 2011-11-26 18:31:22 -0500 |
|---|---|---|
| committer | Blaise Laflamme <blaise@laflamme.org> | 2011-11-26 18:31:22 -0500 |
| commit | 7613a6441f273ccc5642e20b2ce5788d01291466 (patch) | |
| tree | 8de6ce23bf54325b8524c50336020cb509ce1b16 /docs/tutorials/wiki/authorization.rst | |
| parent | 11129ca073b4926037368d9a0bf079dc422e28f7 (diff) | |
| parent | 50e89abccc9c23949fb7cdd928a865712c34aa75 (diff) | |
| download | pyramid-7613a6441f273ccc5642e20b2ce5788d01291466.tar.gz pyramid-7613a6441f273ccc5642e20b2ce5788d01291466.tar.bz2 pyramid-7613a6441f273ccc5642e20b2ce5788d01291466.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/tutorials/wiki/authorization.rst')
| -rw-r--r-- | docs/tutorials/wiki/authorization.rst | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/docs/tutorials/wiki/authorization.rst b/docs/tutorials/wiki/authorization.rst index bf88c3bd8..d900f17a3 100644 --- a/docs/tutorials/wiki/authorization.rst +++ b/docs/tutorials/wiki/authorization.rst @@ -42,7 +42,7 @@ declarative security checking. We need to import the new policies: Then, we'll add those policies to the configuration: .. literalinclude:: src/authorization/tutorial/__init__.py - :lines: 20-25 + :lines: 17-22 :linenos: :language: python @@ -60,10 +60,6 @@ look like so: :linenos: :language: python -.. note:: - (Your ``config.scan('tutorial')`` needs the package name you used - instead of "tutorial", if you used a different name.) - Add ``security.py`` ~~~~~~~~~~~~~~~~~~~ @@ -77,14 +73,13 @@ content: The ``groupfinder`` function defined here is an :term:`authentication policy` "callback"; it is a callable that accepts a userid and a request. If the -userid exists in the system, the callback will -return a sequence of group identifiers (or an empty sequence if the user -isn't a member of any groups). If the userid *does not* exist in the system, -the callback will return ``None``. In a production system, user and group data will -most often come from a database, but here we use "dummy" data to represent -user and groups sources. Note that the ``editor`` user is a member of the -``group:editors`` group in our dummy group data (the ``GROUPS`` data -structure). +userid exists in the system, the callback will return a sequence of group +identifiers (or an empty sequence if the user isn't a member of any groups). +If the userid *does not* exist in the system, the callback will return +``None``. In a production system, user and group data will most often come +from a database, but here we use "dummy" data to represent user and groups +sources. Note that the ``editor`` user is a member of the ``group:editors`` +group in our dummy group data (the ``GROUPS`` data structure). Give Our Root Resource an ACL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
