From 5f6f7184a997cb2dfa341eef53259d4254a242e8 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Sun, 15 Dec 2019 20:27:10 -0800 Subject: Remove requirement that identity is validated. --- src/pyramid/interfaces.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/pyramid/interfaces.py b/src/pyramid/interfaces.py index 891b851ee..c0ff317a4 100644 --- a/src/pyramid/interfaces.py +++ b/src/pyramid/interfaces.py @@ -483,17 +483,16 @@ class IViewMapperFactory(Interface): class ISecurityPolicy(Interface): - def identify(request): - """ Return an object identifying a trusted and verified user for the - current request. The object can be of any shape, such as a simple ID - string or an ORM object. - """ - def authenticated_userid(request, identity): """ Return a :term:`userid` string identifying the trusted and verified user, or ``None`` if unauthenticated. """ + def identify(request): + """ Return the :term:`identity` of the current user. The object can be + of any shape, such as a simple ID string or an ORM object. + """ + def permits(request, context, permission): """ Return an instance of :class:`pyramid.security.Allowed` if a user of the given identity is allowed the ``permission`` in the current -- cgit v1.2.3