diff --git a/auth/scopes.py b/auth/scopes.py index cc42413cd..6762fc42d 100644 --- a/auth/scopes.py +++ b/auth/scopes.py @@ -63,11 +63,12 @@ def get_scope_information(scopes_string): scopes = scopes_from_scope_string(scopes_string) scope_info = [] for scope in scopes: - scope_info.append({ - 'title': ALL_SCOPES[scope]['title'], - 'scope': ALL_SCOPES[scope]['scope'], - 'description': ALL_SCOPES[scope]['description'], - 'icon': ALL_SCOPES[scope]['icon'], - }) + if scope: + scope_info.append({ + 'title': ALL_SCOPES[scope]['title'], + 'scope': ALL_SCOPES[scope]['scope'], + 'description': ALL_SCOPES[scope]['description'], + 'icon': ALL_SCOPES[scope]['icon'], + }) return scope_info diff --git a/endpoints/web.py b/endpoints/web.py index 5ead821da..f7c3ec009 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -278,6 +278,9 @@ def request_authorization_code(): # Load the scope information. scope_info = scopes.get_scope_information(scope) + if not scope_info: + abort(404) + return # Load the application information. oauth_app = provider.get_application_for_client_id(client_id) diff --git a/static/css/quay.css b/static/css/quay.css index f953428a2..7c0378167 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -3451,8 +3451,8 @@ pre.command:before { display: inline-block; } -.auth-scopes .scope .title:hover { - color: #428bca; +.auth-scopes .scope .title a { + color: #444; } .auth-scopes .scope .description { @@ -3462,9 +3462,20 @@ pre.command:before { .auth-scopes .scope i { margin-right: 10px; margin-top: 2px; +} + +.auth-scopes .scope i.fa-lg { font-size: 24px; } +.auth-scopes .title i.arrow:before { + content: "\f0d7"; +} + +.auth-scopes .title.collapsed i.arrow:before { + content: "\f0da" !important; +} + .auth-container .button-bar { margin-top: 10px; padding-top: 10px; diff --git a/templates/oauthorize.html b/templates/oauthorize.html index e7cdb900b..ca97324c5 100644 --- a/templates/oauthorize.html +++ b/templates/oauthorize.html @@ -22,8 +22,9 @@