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
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
b1b75094
Unverified
Commit
b1b75094
authored
3 years ago
by
Shafqat Farhan
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #28743 from edx/shafqat/VAN-474
fix: VAN-474 - Deleted cookie for activation popup
parents
15461d3b
39ee9842
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/student/views/management.py
+10
-1
10 additions, 1 deletion
common/djangoapps/student/views/management.py
with
10 additions
and
1 deletion
common/djangoapps/student/views/management.py
+
10
−
1
View file @
b1b75094
...
...
@@ -527,6 +527,7 @@ def activate_account(request, key):
html_end
=
HTML
(
'
</p>
'
),
)
show_account_activation_popup
=
None
try
:
registration
=
Registration
.
objects
.
get
(
activation_key
=
key
)
except
(
Registration
.
DoesNotExist
,
Registration
.
MultipleObjectsReturned
):
...
...
@@ -585,6 +586,7 @@ def activate_account(request, key):
),
extra_tags
=
'
account-activation aa-icon
'
,
)
show_account_activation_popup
=
request
.
COOKIES
.
get
(
settings
.
SHOW_ACTIVATE_CTA_POPUP_COOKIE_NAME
,
None
)
# If a safe `next` parameter is provided in the request
# and it's not the same as the dashboard, redirect there.
...
...
@@ -612,7 +614,14 @@ def activate_account(request, key):
url_path
=
'
/login?{}
'
.
format
(
urllib
.
parse
.
urlencode
(
params
))
return
redirect
(
settings
.
AUTHN_MICROFRONTEND_URL
+
url_path
)
return
redirect
(
redirect_url
)
if
redirect_url
and
is_enterprise_learner
(
request
.
user
)
else
redirect
(
'
dashboard
'
)
response
=
redirect
(
redirect_url
)
if
redirect_url
and
is_enterprise_learner
(
request
.
user
)
else
redirect
(
'
dashboard
'
)
if
show_account_activation_popup
:
response
.
delete_cookie
(
settings
.
SHOW_ACTIVATE_CTA_POPUP_COOKIE_NAME
,
domain
=
settings
.
SESSION_COOKIE_DOMAIN
,
path
=
'
/
'
,
)
return
response
@ensure_csrf_cookie
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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