diff options
| author | Ben Bangert <ben@groovie.org> | 2010-10-29 11:14:41 -0700 |
|---|---|---|
| committer | Ben Bangert <ben@groovie.org> | 2010-10-29 11:14:41 -0700 |
| commit | 17e70c8db9140c0b4062f46ef5eb4527d678b793 (patch) | |
| tree | 38b6b8de2a57db4debec477bc4fda27db82c4c5a /docs/tutorials/wiki/authorization.rst | |
| parent | d39e99e1f6f06a02a275a8a30f154e0f292d7dff (diff) | |
| parent | 5038994ea9e053b16fca74ea8fa022871e630883 (diff) | |
| download | pyramid-17e70c8db9140c0b4062f46ef5eb4527d678b793.tar.gz pyramid-17e70c8db9140c0b4062f46ef5eb4527d678b793.tar.bz2 pyramid-17e70c8db9140c0b4062f46ef5eb4527d678b793.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 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/tutorials/wiki/authorization.rst b/docs/tutorials/wiki/authorization.rst index 0d135f5e2..189401a45 100644 --- a/docs/tutorials/wiki/authorization.rst +++ b/docs/tutorials/wiki/authorization.rst @@ -182,12 +182,12 @@ Our resulting ``models.py`` file will now look like so: :linenos: :language: python -Adding ``permission`` Declarations to our ``bfg_view`` Decorators ------------------------------------------------------------------ +Adding ``permission`` Declarations to our ``view_config`` Decorators +-------------------------------------------------------------------- To protect each of our views with a particular permission, we need to pass a ``permission`` argument to each of our -:class:`pyramid.view.bfg_view` decorators. To do so, within +:class:`pyramid.view.view_config` decorators. To do so, within ``views.py``: - We add ``permission='view'`` to the decorator attached to the @@ -220,10 +220,10 @@ pass a ``permission`` argument to each of our consults the ``GROUPS`` data structure. This means that the ``editor`` user can add pages. -- We add ``permission='edit'`` to the ``bfg_view`` decorator attached - to the ``edit_page`` view function. This makes the assertion that - only users who possess the effective ``edit`` permission at the time - of the request may invoke this view. We've granted the +- We add ``permission='edit'`` to the decorator attached to the + ``edit_page`` view function. This makes the assertion that only + users who possess the effective ``edit`` permission at the time of + the request may invoke this view. We've granted the ``group:editors`` principal the ``edit`` permission at the root model via its ACL, so only the a user whom is a member of the group named ``group:editors`` will able to invoke the ``edit_page`` view. |
