Logout after import fixes#292
Closed
paigewilliams wants to merge 2 commits into
Closed
Conversation
Collaborator
Author
|
closing to open against |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes post-import UX and reliability around logging out from the import modal by ensuring the “Importing…” spinner is only shown during the import step and by explicitly hitting the logout endpoint before reloading the page.
Changes:
- Add CSRF cookie helper and token retrieval for POSTing to
/logout/. - Gate the “Importing…” spinner behind a
showSpinnerflag so it doesn’t appear during “Log out”. - Replace the prior “reload to log out” behavior with an explicit logout request followed by a reload.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
165
to
+169
| $("#continueImport").html("Log out"); | ||
| $("#continueImport").click(function () { | ||
| location.reload(true); | ||
| $.ajax({ | ||
| url: "/logout/", | ||
| type: "POST", |
Comment on lines
+182
to
184
| showSpinner = false; | ||
| resetModal(); | ||
| } |
Comment on lines
186
to
189
| $("#modalNextSteps").html(unexpectedError(status)); | ||
| showSpinner = false; | ||
| resetModal(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the following bugs:
location.reload(true);. I added a request to thelogouturl to ensure that a user is logged out.