sso: Add captcha validation on 3 failed attempts

- clearing ip address correctly is not implemented yet
- currently clearing all ip addresses

Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalpati authored and James Valleroy committed 2017-10-17 22:07:57 -04:00
1 parent 31cd97e71e
commit f330d09ec9
5 files changed
+31 -12

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ def non_admin_view(func):
def is_user_admin(request, cached=False):
"""Return whether user is an administrator."""
if not request.user.is_authenticated():
if not request.user.is_authenticated:
return False
if 'cache_user_is_admin' in request.session and cached: