Fix OAuth scopes display

Before, we were sending the wrong kind of data (namedtuple instead of dict) in the non-superuser case, which broke prod. Now, we always explicitly send a standard dictionary.

Fixes https://jira.coreos.com/browse/QUAY-871
This commit is contained in:
Joseph Schorr 2018-03-16 13:03:42 -04:00
parent 32a473d23c
commit 86f898d9bd
3 changed files with 7 additions and 6 deletions

View file

@ -96,11 +96,10 @@ IMPLIED_SCOPES = {
def app_scopes(app_config):
scopes_from_config = dict(ALL_SCOPES)
if not app_config.get('FEATURE_SUPER_USERS', False):
scopes_from_config = dict(ALL_SCOPES)
del scopes_from_config[SUPERUSER.scope]
return scopes_from_config
return ALL_SCOPES
return scopes_from_config
def scopes_from_scope_string(scopes):