diff options
| author | Chris McDonough <chrism@agendaless.com> | 2008-07-20 08:41:08 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2008-07-20 08:41:08 +0000 |
| commit | b54cdb6d0951a28b7d7bf4f585a4059cc5e6b18a (patch) | |
| tree | 0b600c099bdec04c46c13512689c59c9ec8dadac /repoze/bfg/interfaces.py | |
| parent | ae0b3f07e3e6b8d6cde11ddf2fead38b7fc8dfd3 (diff) | |
| download | pyramid-b54cdb6d0951a28b7d7bf4f585a4059cc5e6b18a.tar.gz pyramid-b54cdb6d0951a28b7d7bf4f585a4059cc5e6b18a.tar.bz2 pyramid-b54cdb6d0951a28b7d7bf4f585a4059cc5e6b18a.zip | |
- Add API functions for authenticated_userid and effective_principals.
Diffstat (limited to 'repoze/bfg/interfaces.py')
| -rw-r--r-- | repoze/bfg/interfaces.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 710b91074..fee7b8d61 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -46,6 +46,15 @@ class ISecurityPolicy(Interface): information in the context and the authentication data in the request allow the action implied by the permission """ + def authenticated_userid(request): + """ Return the userid of the currently authenticated user or + None if there is no currently authenticated user """ + + def effective_principals(request): + """ Return the list of 'effective' principals for the request. + This must include the userid of the currently authenticated + user if a user is currently authenticated.""" + class NoAuthorizationInformation(Exception): pass |
