diff options
| author | Michael Merickel <github@m.merickel.org> | 2024-02-07 21:02:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-07 21:02:40 -0700 |
| commit | 03e2e439f263aca7d4efa8173c0bbc4aacb8a3c2 (patch) | |
| tree | a052858496fce4e03b16098cc11e9b8a0aba1617 /docs/tutorials/wiki2/authorization.rst | |
| parent | 53eb7e7cc6b7bfdedb4df4821af66619bebf909c (diff) | |
| parent | 222386e96a1711b6215f64ea809a9f4a7a8c2202 (diff) | |
| download | pyramid-03e2e439f263aca7d4efa8173c0bbc4aacb8a3c2.tar.gz pyramid-03e2e439f263aca7d4efa8173c0bbc4aacb8a3c2.tar.bz2 pyramid-03e2e439f263aca7d4efa8173c0bbc4aacb8a3c2.zip | |
Merge pull request #3747 from Pylons/wiki2-sqla-2.0
upgrade the wiki2 tutorial with the new cookiecutter updates
Diffstat (limited to 'docs/tutorials/wiki2/authorization.rst')
| -rw-r--r-- | docs/tutorials/wiki2/authorization.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index e0c59a5b6..84b05b863 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -89,7 +89,7 @@ Open the file ``tutorial/routes.py`` and edit the following lines: .. literalinclude:: src/authorization/tutorial/routes.py :linenos: - :emphasize-lines: 1-11,18- + :emphasize-lines: 1-11,19- :language: python The highlighted lines need to be edited or added. @@ -101,7 +101,7 @@ the principals of either ``role:editor`` or ``role:basic`` to have the ``create`` permission: .. literalinclude:: src/authorization/tutorial/routes.py - :lines: 31-39 + :lines: 35-43 :lineno-match: :emphasize-lines: 5-9 :language: python @@ -110,7 +110,7 @@ The ``NewPage`` is loaded as the :term:`context` of the ``add_page`` route by declaring a ``factory`` on the route: .. literalinclude:: src/authorization/tutorial/routes.py - :lines: 19-20 + :lines: 20-21 :lineno-match: :emphasize-lines: 1-2 :language: python @@ -119,7 +119,7 @@ The ``PageResource`` class defines the :term:`ACL` for a ``Page``. It uses an actual ``Page`` object to determine *who* can do *what* to the page. .. literalinclude:: src/authorization/tutorial/routes.py - :lines: 48- + :lines: 54- :lineno-match: :emphasize-lines: 5-10 :language: python @@ -128,7 +128,7 @@ The ``PageResource`` is loaded as the :term:`context` of the ``view_page`` and ``edit_page`` routes by declaring a ``factory`` on the routes: .. literalinclude:: src/authorization/tutorial/routes.py - :lines: 18-22 + :lines: 19-23 :lineno-match: :emphasize-lines: 1,4-5 :language: python @@ -157,7 +157,7 @@ Edit the ``view_page`` view to declare the ``view`` permission, and remove the explicit checks within the view: .. literalinclude:: src/authorization/tutorial/views/default.py - :lines: 18-23 + :lines: 19-24 :lineno-match: :emphasize-lines: 1-2,4 :language: python @@ -171,7 +171,7 @@ the view logic. Edit the ``edit_page`` view to declare the ``edit`` permission: .. literalinclude:: src/authorization/tutorial/views/default.py - :lines: 38-42 + :lines: 41-45 :lineno-match: :emphasize-lines: 1-2,4 :language: python @@ -179,7 +179,7 @@ Edit the ``edit_page`` view to declare the ``edit`` permission: Edit the ``add_page`` view to declare the ``create`` permission: .. literalinclude:: src/authorization/tutorial/views/default.py - :lines: 52-56 + :lines: 55-59 :lineno-match: :emphasize-lines: 1-2,4 :language: python |
