Skip to content
Snippets Groups Projects
Commit 4d656061 authored by Jason Bau's avatar Jason Bau
Browse files

Removing handling for ExternalAuthMap.MultipleObjectsReturned

parent 948c07c4
No related branches found
No related tags found
No related merge requests found
...@@ -467,8 +467,9 @@ def login_user(request, error=""): ...@@ -467,8 +467,9 @@ def login_user(request, error=""):
eamap = ExternalAuthMap.objects.get(user=user) eamap = ExternalAuthMap.objects.get(user=user)
if eamap.external_domain.startswith(SHIB_DOMAIN_PREFIX): if eamap.external_domain.startswith(SHIB_DOMAIN_PREFIX):
return HttpResponse(json.dumps({'success': False, 'redirect': reverse('shib-login')})) return HttpResponse(json.dumps({'success': False, 'redirect': reverse('shib-login')}))
except (ExternalAuthMap.DoesNotExist, ExternalAuthMap.MultipleObjectsReturned): except ExternalAuthMap.DoesNotExist:
pass # This is actually the common case, logging in user without external linked login
log.info("User %s w/o external auth attempting login", user)
# if the user doesn't exist, we want to set the username to an invalid # if the user doesn't exist, we want to set the username to an invalid
# username so that authentication is guaranteed to fail and we can take # username so that authentication is guaranteed to fail and we can take
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment