diff options
| author | Éric Araujo <earaujo@caravan.coop> | 2019-12-14 13:32:07 -0500 |
|---|---|---|
| committer | Éric Araujo <earaujo@caravan.coop> | 2019-12-14 13:32:07 -0500 |
| commit | 0168300b0da3c79e05ec87aa777e04674a86cebb (patch) | |
| tree | 4e1f38841af1e6f8fd20b4e536ddbe946c294911 /tests/pkgs | |
| parent | 4a46827769bbe181070a74927aa4e988a4cc3112 (diff) | |
| download | pyramid-0168300b0da3c79e05ec87aa777e04674a86cebb.tar.gz pyramid-0168300b0da3c79e05ec87aa777e04674a86cebb.tar.bz2 pyramid-0168300b0da3c79e05ec87aa777e04674a86cebb.zip | |
start reworking security policy
Diffstat (limited to 'tests/pkgs')
| -rw-r--r-- | tests/pkgs/securityapp/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/pkgs/securityapp/__init__.py b/tests/pkgs/securityapp/__init__.py index 6ddba585b..b869ab541 100644 --- a/tests/pkgs/securityapp/__init__.py +++ b/tests/pkgs/securityapp/__init__.py @@ -4,9 +4,13 @@ from pyramid.security import Allowed, Denied class SecurityPolicy: def identify(self, request): + ... + + def authenticated_userid(self, request): return request.environ.get('REMOTE_USER') - def permits(self, request, context, identity, permission): + def permits(self, request, context, permission): + identity = self.identify(request) if identity and permission == 'foo': return Allowed('') else: @@ -15,7 +19,7 @@ class SecurityPolicy: def remember(self, request, userid, **kw): raise NotImplementedError() # pragma: no cover - def forget(self, request): + def forget(self, request, **kw): raise NotImplementedError() # pragma: no cover |
