diff options
| author | Theron Luhn <theron@luhn.com> | 2019-12-14 20:17:36 -0800 |
|---|---|---|
| committer | Theron Luhn <theron@luhn.com> | 2019-12-14 20:17:36 -0800 |
| commit | 2e06fa414412688dc3b7e0b422b0fc0b96ec882f (patch) | |
| tree | 8acfecec6dd36eb8ed0763a93a7674ebc7fc140a /tests/pkgs/securityapp | |
| parent | cd0b92d10bfbb38068c216ce44dde9732fa127a8 (diff) | |
| download | pyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.tar.gz pyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.tar.bz2 pyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.zip | |
Bring back identity into permits.
Diffstat (limited to 'tests/pkgs/securityapp')
| -rw-r--r-- | tests/pkgs/securityapp/__init__.py | 4 |
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('') |
