diff --git a/auth/scopes.py b/auth/scopes.py index c41ad7033..dbbb0ae1c 100644 --- a/auth/scopes.py +++ b/auth/scopes.py @@ -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): diff --git a/endpoints/common.py b/endpoints/common.py index 77a19b39f..355817dce 100644 --- a/endpoints/common.py +++ b/endpoints/common.py @@ -115,6 +115,8 @@ def render_page_template(name, route_data=None, **kwargs): if not features.BILLING: version_number = 'Quay %s' % __version__ + scopes_set = {scope.scope: scope._asdict() for scope in scopes.app_scopes(app.config).values()} + contents = render_template(name, route_data=route_data, external_styles=external_styles, @@ -124,7 +126,7 @@ def render_page_template(name, route_data=None, **kwargs): config_set=frontend_visible_config(app.config), oauth_set=get_oauth_config(), external_login_set=get_external_login_config(), - scope_set=scopes.app_scopes(app.config), + scope_set=scopes_set, vuln_priority_set=PRIORITY_LEVELS, enterprise_logo=app.config.get('ENTERPRISE_LOGO_URL', ''), mixpanel_key=app.config.get('MIXPANEL_KEY', ''), diff --git a/static/partials/manage-application.html b/static/partials/manage-application.html index 52264bd45..90bb4dc5c 100644 --- a/static/partials/manage-application.html +++ b/static/partials/manage-application.html @@ -112,9 +112,9 @@