From e0d1af934d85a34a83e2026976ddd05d92d21b5e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Oct 2013 20:55:55 -0400 Subject: indicate default --- pyramid/security.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pyramid/security.py b/pyramid/security.py index 7ffd37b8c..d754aeadf 100644 --- a/pyramid/security.py +++ b/pyramid/security.py @@ -465,15 +465,16 @@ class AuthenticationAPIMixin(object): class AuthorizationAPIMixin(object): def has_permission(self, permission, context=None): - """ Given a permission and an optional context, - returns an instance of :data:`pyramid.security.Allowed` if the - permission is granted to this request with the provided context, - or the context already associated with the request. Otherwise, - returns an instance of :data:`pyramid.security.Denied`. - This method delegates to the current authentication and - authorization policies. Returns :data:`pyramid.security.Allowed` - unconditionally if no authentication policy has been registered - for this request. + """ Given a permission and an optional context, returns an instance of + :data:`pyramid.security.Allowed` if the permission is granted to this + request with the provided context, or the context already associated + with the request. Otherwise, returns an instance of + :data:`pyramid.security.Denied`. This method delegates to the current + authentication and authorization policies. Returns + :data:`pyramid.security.Allowed` unconditionally if no authentication + policy has been registered for this request. If ``context`` is not + supplied or is supplied as ``None``, the context used is the + ``request.context`` attribute. :param permission: Does this request have the given permission? :type permission: unicode, str -- cgit v1.2.3