From 6dcdcc40d59f10778a4dd7f2e93a33edfe9dc618 Mon Sep 17 00:00:00 2001 From: vjalili Date: Mon, 19 Mar 2018 17:31:39 -0700 Subject: [PATCH] When OIDC is not enabled and user manually reaches its endpoint, Galaxy now informs the user that OIDC is not enabled on that instance. --- lib/galaxy/webapps/galaxy/controllers/authnz.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/galaxy/webapps/galaxy/controllers/authnz.py b/lib/galaxy/webapps/galaxy/controllers/authnz.py index d859255c812..52816d7b769 100644 --- a/lib/galaxy/webapps/galaxy/controllers/authnz.py +++ b/lib/galaxy/webapps/galaxy/controllers/authnz.py @@ -17,6 +17,10 @@ class OIDC(BaseUIController): @web.expose def login(self, trans, provider): + if not trans.app.config.enable_oidc: + msg = "Login to Galaxy using third-party identities is not enabled on this Galaxy instance." + log.debug(msg) + return trans.show_error_message(msg) success, message, redirect_uri = trans.app.authnz_manager.authenticate(provider, trans) return trans.response.send_redirect(web.url_for(redirect_uri))