Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
5333bd7d
Commit
5333bd7d
authored
Apr 29, 2014
by
John Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug that prevented account association during registration
parent
f7683833
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
common/djangoapps/third_party_auth/pipeline.py
+1
-1
common/djangoapps/third_party_auth/tests/specs/base.py
+7
-11
No files found.
common/djangoapps/third_party_auth/pipeline.py
View file @
5333bd7d
...
...
@@ -350,7 +350,7 @@ def redirect_to_supplementary_form(strategy, details, response, uid, is_dashboar
user_inactive
=
user
and
not
user
.
is_active
user_unset
=
user
is
None
dispatch_to_login
=
(
is_login
and
user_unset
)
or
user_inactive
dispatch_to_login
=
is_login
and
(
user_unset
or
user_inactive
)
if
is_dashboard
:
return
...
...
common/djangoapps/third_party_auth/tests/specs/base.py
View file @
5333bd7d
...
...
@@ -640,21 +640,17 @@ class IntegrationTest(testutil.TestCase, test.TestCase):
created_user
=
self
.
get_user_by_email
(
strategy
,
email
)
self
.
assert_password_overridden_by_pipeline
(
overridden_password
,
created_user
.
username
)
# The user's account isn't created yet, so an attempt to complete the
# pipeline will error out on /login:
self
.
assert_redirect_to_login_looks_correct
(
actions
.
do_complete
(
strategy
,
social_views
.
_do_login
,
user
=
created_user
))
# So we activate the account in order to verify the redirect to /dashboard:
created_user
.
is_active
=
True
created_user
.
save
()
# At this point the user object exists, but there is no associated
# social auth.
self
.
assert_social_auth_does_not_exist_for_user
(
created_user
,
strategy
)
#
Last step in the pipeline: we re-invoke the pipeline and expect to
#
end up on /dashboard, with the correct social auth object now in th
e
#
backend and the correct user's data on display
.
#
Pick the pipeline back up. This will create the account association
#
and send the user to the dashboard, where the association will b
e
#
displayed
.
self
.
assert_redirect_to_dashboard_looks_correct
(
actions
.
do_complete
(
strategy
,
social_views
.
_do_login
,
user
=
created_user
))
self
.
assert_social_auth_exists_for_user
(
created_user
,
strategy
)
self
.
assert_dashboard_response_looks_correct
(
student_views
.
dashboard
(
request
),
created_user
)
self
.
assert_dashboard_response_looks_correct
(
student_views
.
dashboard
(
request
),
created_user
,
linked
=
True
)
def
test_new_account_registration_assigns_distinct_username_on_collision
(
self
):
original_username
=
self
.
get_username
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment