diff options
| author | Michael Merickel <michael@merickel.org> | 2020-01-16 10:34:45 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2020-01-16 10:34:45 -0600 |
| commit | 592cadd9c20ce410d9ab7b9a748ec59dff001f65 (patch) | |
| tree | 2e4133bffc8363259afef49f8899402d17098246 /docs/tutorials/wiki2 | |
| parent | a7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9 (diff) | |
| download | pyramid-592cadd9c20ce410d9ab7b9a748ec59dff001f65.tar.gz pyramid-592cadd9c20ce410d9ab7b9a748ec59dff001f65.tar.bz2 pyramid-592cadd9c20ce410d9ab7b9a748ec59dff001f65.zip | |
update docs with pyramid.authorizatio imports after syncing master
Diffstat (limited to 'docs/tutorials/wiki2')
5 files changed, 15 insertions, 15 deletions
diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index 001bde935..38b9b7373 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -30,7 +30,7 @@ identifiers that are easier to generalize. The permissions are then written against the principals without focusing on the exact user involved. :app:`Pyramid` defines two builtin principals used in every application: -:attr:`pyramid.security.Everyone` and :attr:`pyramid.security.Authenticated`. +:attr:`pyramid.authorization.Everyone` and :attr:`pyramid.authorization.Authenticated`. On top of these we have already mentioned the required principals for this application in the original design. The user has two possible roles: ``editor`` or ``basic``. These will be prefixed by the string ``role:`` to avoid clashing @@ -40,7 +40,7 @@ Open the file ``tutorial/security.py`` and edit it as follows: .. literalinclude:: src/authorization/tutorial/security.py :linenos: - :emphasize-lines: 2,5-8,17,42-53 + :emphasize-lines: 2-6,17,42-53 :language: python Only the highlighted lines need to be added. diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/routes.py b/docs/tutorials/wiki2/src/authorization/tutorial/routes.py index f016d7541..f7bbe6011 100644 --- a/docs/tutorials/wiki2/src/authorization/tutorial/routes.py +++ b/docs/tutorials/wiki2/src/authorization/tutorial/routes.py @@ -1,11 +1,11 @@ +from pyramid.authorization import ( + Allow, + Everyone, +) from pyramid.httpexceptions import ( HTTPNotFound, HTTPSeeOther, ) -from pyramid.security import ( - Allow, - Everyone, -) from . import models diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/security.py b/docs/tutorials/wiki2/src/authorization/tutorial/security.py index 7a99fb9e9..5a9d4bbf2 100644 --- a/docs/tutorials/wiki2/src/authorization/tutorial/security.py +++ b/docs/tutorials/wiki2/src/authorization/tutorial/security.py @@ -1,11 +1,11 @@ from pyramid.authentication import AuthTktCookieHelper -from pyramid.authorization import ACLHelper -from pyramid.csrf import CookieCSRFStoragePolicy -from pyramid.request import RequestLocalCache -from pyramid.security import ( +from pyramid.authorization import ( + ACLHelper, Authenticated, Everyone, ) +from pyramid.csrf import CookieCSRFStoragePolicy +from pyramid.request import RequestLocalCache from . import models diff --git a/docs/tutorials/wiki2/src/tests/tutorial/routes.py b/docs/tutorials/wiki2/src/tests/tutorial/routes.py index f016d7541..7070884d3 100644 --- a/docs/tutorials/wiki2/src/tests/tutorial/routes.py +++ b/docs/tutorials/wiki2/src/tests/tutorial/routes.py @@ -2,7 +2,7 @@ from pyramid.httpexceptions import ( HTTPNotFound, HTTPSeeOther, ) -from pyramid.security import ( +from pyramid.authorization import ( Allow, Everyone, ) diff --git a/docs/tutorials/wiki2/src/tests/tutorial/security.py b/docs/tutorials/wiki2/src/tests/tutorial/security.py index 7a99fb9e9..5a9d4bbf2 100644 --- a/docs/tutorials/wiki2/src/tests/tutorial/security.py +++ b/docs/tutorials/wiki2/src/tests/tutorial/security.py @@ -1,11 +1,11 @@ from pyramid.authentication import AuthTktCookieHelper -from pyramid.authorization import ACLHelper -from pyramid.csrf import CookieCSRFStoragePolicy -from pyramid.request import RequestLocalCache -from pyramid.security import ( +from pyramid.authorization import ( + ACLHelper, Authenticated, Everyone, ) +from pyramid.csrf import CookieCSRFStoragePolicy +from pyramid.request import RequestLocalCache from . import models |
