diff options
| author | Chris McDonough <chrism@plope.com> | 2011-11-18 10:03:16 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-11-18 10:03:16 -0500 |
| commit | 0694f092797ddc4a1821e89e776adb17bc89f52d (patch) | |
| tree | ecd3c7cf11719168b02e18aff433b14b846f04c6 /docs/tutorials/wiki/authorization.rst | |
| parent | 40b3a8a15e972a7d1dc0b0c7909d3e2a24f91afe (diff) | |
| download | pyramid-0694f092797ddc4a1821e89e776adb17bc89f52d.tar.gz pyramid-0694f092797ddc4a1821e89e776adb17bc89f52d.tar.bz2 pyramid-0694f092797ddc4a1821e89e776adb17bc89f52d.zip | |
- Fix ZODB tutorial docs to match ZODB tutorial code (I removed program name
from ``scan``).
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
