From 48391dfa5e5b6f6b4b563b24e1ac227ea1deceb4 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Mon, 28 Nov 2016 23:09:14 -0500 Subject: [PATCH] Don't prompt for basic auth if AUTH_BASIC_ENABLED is False. --- awx/api/authentication.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/awx/api/authentication.py b/awx/api/authentication.py index 5f410c8b11..1086778897 100644 --- a/awx/api/authentication.py +++ b/awx/api/authentication.py @@ -133,6 +133,11 @@ class LoggedBasicAuthentication(authentication.BasicAuthentication): logger.debug(smart_text(u"User {} performed a {} to {} through the API".format(username, request.method, request.path))) return ret + def authenticate_header(self, request): + if not settings.AUTH_BASIC_ENABLED: + return + return super(LoggedBasicAuthentication, self).authenticate_header(request) + class TaskAuthentication(authentication.BaseAuthentication): '''