diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pyramid/authorization.py | 2 | ||||
| -rw-r--r-- | src/pyramid/config/security.py | 8 | ||||
| -rw-r--r-- | src/pyramid/interfaces.py | 17 | ||||
| -rw-r--r-- | src/pyramid/security.py | 8 | ||||
| -rw-r--r-- | src/pyramid/session.py | 4 |
5 files changed, 23 insertions, 16 deletions
diff --git a/src/pyramid/authorization.py b/src/pyramid/authorization.py index eadd46f85..2bef53ad9 100644 --- a/src/pyramid/authorization.py +++ b/src/pyramid/authorization.py @@ -60,7 +60,7 @@ class ACLAuthorizationPolicy: .. deprecated:: 2.0 Authorization policies have been deprecated by the new security system. - See :ref:`upgrading_auth` for more information. + See :ref:`upgrading_auth_20` for more information. """ diff --git a/src/pyramid/config/security.py b/src/pyramid/config/security.py index 8939cf62e..59e8d0799 100644 --- a/src/pyramid/config/security.py +++ b/src/pyramid/config/security.py @@ -60,8 +60,8 @@ class SecurityConfiguratorMixin: """ .. deprecated:: 2.0 - Authentication policies have been replaced by - security policies. See :ref:`upgrading_auth` for more information. + Authentication policies have been replaced by security policies. + See :ref:`upgrading_auth_20` for more information. Override the :app:`Pyramid` :term:`authentication policy` in the current configuration. The ``policy`` argument must be an instance @@ -121,8 +121,8 @@ class SecurityConfiguratorMixin: """ .. deprecated:: 2.0 - Authentication policies have been replaced by - security policies. See :ref:`upgrading_auth` for more information. + Authentication policies have been replaced by security policies. + See :ref:`upgrading_auth_20` for more information. Override the :app:`Pyramid` :term:`authorization policy` in the current configuration. The ``policy`` argument must be an instance diff --git a/src/pyramid/interfaces.py b/src/pyramid/interfaces.py index 0b7a07040..6704f7c7c 100644 --- a/src/pyramid/interfaces.py +++ b/src/pyramid/interfaces.py @@ -116,7 +116,7 @@ class IResponse(Interface): identity = Attribute( """An object containing authentication information related to the current request. The object's type and meaning is defined by the - configured security policy.""" + configured :term:`security policy`.""" ) authenticated_userid = Attribute( @@ -245,7 +245,11 @@ class IResponse(Interface): is_authenticated = Attribute( """A boolean indicating whether the request has an authenticated - user, as determined by the security policy in use.""" + user, as determined by the security policy in use. + + The value is determined by the result of + :attr:`pyramid.request.Request.authenticated_userid`. + """ ) last_modified = Attribute( @@ -506,6 +510,9 @@ class ISecurityPolicy(Interface): def authenticated_userid(request): """Return a :term:`userid` string identifying the trusted and verified user, or ``None`` if unauthenticated. + + If the result is ``None``, then + :attr:`pyramid.request.Request.is_authenticated` will return ``False``. """ def permits(request, context, permission): @@ -535,7 +542,7 @@ class IAuthenticationPolicy(Interface): .. deprecated:: 2.0 Authentication policies have been removed in favor of security - policies. See :ref:`upgrading_auth` for more information. + policies. See :ref:`upgrading_auth_20` for more information. """ @@ -595,7 +602,7 @@ class IAuthorizationPolicy(Interface): .. deprecated:: 2.0 Authentication policies have been removed in favor of security - policies. See :ref:`upgrading_auth` for more information. + policies. See :ref:`upgrading_auth_20` for more information. """ @@ -1139,7 +1146,7 @@ class ISession(IDict): support types that can be serialized using JSON. It's recommended to switch any session implementations to support only JSON and to only store primitive types in sessions. See - :ref:`pickle_session_deprecation` for more information about why this + :ref:`upgrading_session_20` for more information about why this change was made. .. versionchanged:: 1.9 diff --git a/src/pyramid/security.py b/src/pyramid/security.py index 9cdafaf6f..a0ab39701 100644 --- a/src/pyramid/security.py +++ b/src/pyramid/security.py @@ -85,7 +85,7 @@ def principals_allowed_by_permission(context, permission): .. deprecated:: 2.0 The new security policy has removed the concept of principals. See - :ref:`upgrading_auth` for more information. + :ref:`upgrading_auth_20` for more information. Provided a ``context`` (a resource object), and a ``permission`` string, if an :term:`authorization policy` is @@ -286,8 +286,8 @@ class AuthenticationAPIMixin: .. deprecated:: 2.0 ``unauthenticated_userid`` does not have an equivalent in the new - security system. Use :attr:`.authenticated_userid` or - :attr:`.identity` instead. See :ref:`upgrading_auth` for more + security system. Use :attr:`.authenticated_userid` or + :attr:`.identity` instead. See :ref:`upgrading_auth_20` for more information. Return an object which represents the *claimed* (not verified) user @@ -322,7 +322,7 @@ class AuthenticationAPIMixin: .. deprecated:: 2.0 The new security policy has removed the concept of principals. See - :ref:`upgrading_auth` for more information. + :ref:`upgrading_auth_20` for more information. Return the list of 'effective' :term:`principal` identifiers for the ``request``. If no :term:`authentication policy` is in effect, diff --git a/src/pyramid/session.py b/src/pyramid/session.py index 8c27aa674..032d58a8b 100644 --- a/src/pyramid/session.py +++ b/src/pyramid/session.py @@ -51,7 +51,7 @@ class PickleSerializer: Pyramid will require JSON-serializable objects in :app:`Pyramid` 2.0. - Please see :ref:`pickle_session_deprecation`. + Please see :ref:`upgrading_session_20`. A serializer that uses the pickle protocol to dump Python data to bytes. @@ -456,7 +456,7 @@ def SignedCookieSessionFactory( In :app:`Pyramid` 2.0 the default ``serializer`` option changed to use :class:`pyramid.session.JSONSerializer`. See - :ref:`pickle_session_deprecation` for more information about why this + :ref:`upgrading_session_20` for more information about why this change was made. .. versionadded: 1.5a3 |
