diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-11-16 21:36:04 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-11-16 21:36:04 +0200 |
commit | 6d621d3a51ba68f0a436d5c5b27ace6cb2825f50 (patch) | |
tree | 6817d537d5475ccd3b8d888e20cdc51bd357f33e /yarns/lib.py | |
parent | d30c7d5dac5891ad86a3491e198cb384e466932e (diff) | |
download | muck-poc-6d621d3a51ba68f0a436d5c5b27ace6cb2825f50.tar.gz |
Change: allow super users to impersonate other users
Diffstat (limited to 'yarns/lib.py')
-rw-r--r-- | yarns/lib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/yarns/lib.py b/yarns/lib.py index 583dff5..f64af8d 100644 --- a/yarns/lib.py +++ b/yarns/lib.py @@ -57,6 +57,7 @@ def start_muck(): pathname, config_filename, ] subprocess.check_call(argv) + time.sleep(2) V['base_url'] = 'http://127.0.0.1:{}'.format(12765) @@ -72,6 +73,8 @@ def create_test_token(sub): iss = 'test-issuer' aud = 'test-audience' scopes = ['create', 'update', 'show', 'delete'] + if sub in (V['superusers'] or []): + scopes.append('super') lifetime = 3600 return create_token(key_text, iss, aud, sub, scopes, lifetime) |