summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2013-10-30 20:55:55 -0400
committerChris McDonough <chrism@plope.com>2013-10-30 20:55:55 -0400
commite0d1af934d85a34a83e2026976ddd05d92d21b5e (patch)
tree7897264781fa0743aeb6d803f385a758b1d360e2
parent9a1e1ec235dd187e6aae675873688ab9b086b4ef (diff)
downloadpyramid-e0d1af934d85a34a83e2026976ddd05d92d21b5e.tar.gz
pyramid-e0d1af934d85a34a83e2026976ddd05d92d21b5e.tar.bz2
pyramid-e0d1af934d85a34a83e2026976ddd05d92d21b5e.zip
indicate default
-rw-r--r--pyramid/security.py19
1 files 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