1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Merge pull request #3270 from saito-hideki/issue/tower_3344

Add action to output login failure event to logfile

Reviewed-by: Ryan Petrello
             https://github.com/ryanpetrello
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-02-20 16:01:31 +00:00 committed by GitHub
commit 6abe9d5c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,8 @@ class LoggedLoginView(auth_views.LoginView):
return ret
else:
if 'username' in self.request.POST:
logger.warn(smart_text(u"Login failed for user {}".format(self.request.POST.get('username'))))
ret.status_code = 401
return ret