summaryrefslogtreecommitdiff
path: root/tests/pkgs
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2019-12-14 20:17:36 -0800
committerTheron Luhn <theron@luhn.com>2019-12-14 20:17:36 -0800
commit2e06fa414412688dc3b7e0b422b0fc0b96ec882f (patch)
tree8acfecec6dd36eb8ed0763a93a7674ebc7fc140a /tests/pkgs
parentcd0b92d10bfbb38068c216ce44dde9732fa127a8 (diff)
downloadpyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.tar.gz
pyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.tar.bz2
pyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.zip
Bring back identity into permits.
Diffstat (limited to 'tests/pkgs')
-rw-r--r--tests/pkgs/securityapp/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pkgs/securityapp/__init__.py b/tests/pkgs/securityapp/__init__.py
index 6c9025e7d..caf65ad4c 100644
--- a/tests/pkgs/securityapp/__init__.py
+++ b/tests/pkgs/securityapp/__init__.py
@@ -4,12 +4,12 @@ from pyramid.security import Allowed, Denied
class SecurityPolicy:
def identify(self, request):
- raise NotImplementedError() # pragma: no cover
+ return self.authenticated_userid(request)
def authenticated_userid(self, request):
return request.environ.get('REMOTE_USER')
- def permits(self, request, context, permission):
+ def permits(self, request, context, identity, permission):
userid = self.authenticated_userid(request)
if userid and permission == 'foo':
return Allowed('')