From fe197640038f0aa18a8d453e820df9e1b2d1bee7 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 5 Jan 2013 15:18:36 +0200 Subject: typo --- docs/tutorials/wiki2/authorization.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/authorization.rst') diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index d98fb87e4..cfbc8ca75 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -14,7 +14,7 @@ anyone with access to the server to view pages. We will also add a login page and a logout link on all the pages. The login page will be shown when a user is denied -access to any of the views that require a permission, instead of +access to any of the views that require permission, instead of a default "403 Forbidden" page. We will implement the access control with the following steps: -- cgit v1.2.3 From 064080f2496ef09eb79a0c370eb0db9dfd5c459c Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 5 Jan 2013 19:28:09 +0200 Subject: sentence too long; also fix grammar, and add markup --- docs/tutorials/wiki2/authorization.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/tutorials/wiki2/authorization.rst') diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index d98fb87e4..933c37f94 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -62,7 +62,7 @@ returns one of these values: - If the userid *does not* exist in the system, it will return ``None``. -For example, ``groupfinder('editor', request )`` returns ['group:editor'], +For example, ``groupfinder('editor', request )`` returns ``['group:editor']``, ``groupfinder('viewer', request)`` returns [], and ``groupfinder('admin', request)`` returns ``None``. We will use ``groupfinder()`` as an :term:`authentication policy` "callback" that will provide the :term:`principal` or principals @@ -151,10 +151,10 @@ Now add those policies to the configuration: (Only the highlighted lines need to be added.) -We are enabling an ``AuthTktAuthenticationPolicy``, it is based in an -auth ticket that may be included in the request, and an -``ACLAuthorizationPolicy`` that uses an ACL to determine the allow or deny -outcome for a view. +We are enabling an ``AuthTktAuthenticationPolicy``, which is based in an +auth ticket that may be included in the request. +We are also enabling an ``ACLAuthorizationPolicy``, which uses an ACL to +determine the *allow* or *deny* outcome for a view. Note that the :class:`pyramid.authentication.AuthTktAuthenticationPolicy` constructor accepts two arguments: ``secret`` and ``callback``. ``secret`` is -- cgit v1.2.3 From 97895f871d1e2bd168e4bfb29d61472a44d3b0e9 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 5 Jan 2013 20:14:25 +0200 Subject: no need to display the entire path --- docs/tutorials/wiki2/authorization.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/authorization.rst') diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index d98fb87e4..ff269ef6b 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -156,7 +156,7 @@ auth ticket that may be included in the request, and an ``ACLAuthorizationPolicy`` that uses an ACL to determine the allow or deny outcome for a view. -Note that the :class:`pyramid.authentication.AuthTktAuthenticationPolicy` +Note that the :class:`~pyramid.authentication.AuthTktAuthenticationPolicy` constructor accepts two arguments: ``secret`` and ``callback``. ``secret`` is a string representing an encryption key used by the "authentication ticket" machinery represented by this policy: it is required. The ``callback`` is the -- cgit v1.2.3 From 998b3970c98baa0c591507f94e6ec32b65969045 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 5 Jan 2013 20:38:25 +0200 Subject: remove info that should be obvious to the reader --- docs/tutorials/wiki2/authorization.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'docs/tutorials/wiki2/authorization.rst') diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index d98fb87e4..03a06e304 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -303,9 +303,8 @@ like this: (Only the highlighted line needs to be added.) -:meth:`~pyramid.security.authenticated_userid()` will return None -if the user is not authenticated, or some user id it the user -is authenticated. +The :meth:`~pyramid.security.authenticated_userid` method will return None +if the user is not authenticated. Add a "Logout" link when logged in ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3