From 4c95ccd5e9b9657165f6ba061ee795fc4a5fcd30 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Sun, 12 May 2019 12:13:26 -0700 Subject: Narrative docs WIP --- src/pyramid/interfaces.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pyramid/interfaces.py b/src/pyramid/interfaces.py index 9dabb9cfc..bc52e324e 100644 --- a/src/pyramid/interfaces.py +++ b/src/pyramid/interfaces.py @@ -484,13 +484,18 @@ class IViewMapperFactory(Interface): class ISecurityPolicy(Interface): def identify(request): - """ Return an object identifying a trusted and verified user. """ + """ Return an object identifying a trusted and verified user. This + object may be anything, but should implement a ``__str__`` method for + logging and debugging purposes. + + """ def permits(request, context, identity, permission): """ Return an instance of :class:`pyramid.security.Allowed` if a user of the given identity is allowed the ``permission`` in the current ``context``, else return an instance of :class:`pyramid.security.Denied`. + """ def remember(request, userid, **kw): -- cgit v1.2.3