Don't prompt for basic auth if AUTH_BASIC_ENABLED is False.

This commit is contained in:
Chris Church 2016-11-28 23:09:14 -05:00
parent 29cc5d0f2e
commit 48391dfa5e

View File

@ -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):
'''