Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
4d656061
Commit
4d656061
authored
11 years ago
by
Jason Bau
Browse files
Options
Downloads
Patches
Plain Diff
Removing handling for ExternalAuthMap.MultipleObjectsReturned
parent
948c07c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/student/views.py
+3
-2
3 additions, 2 deletions
common/djangoapps/student/views.py
with
3 additions
and
2 deletions
common/djangoapps/student/views.py
+
3
−
2
View file @
4d656061
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment