Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BI-1438] login redirect: redirect from nonexistent page after login #236

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

ctucker3
Copy link
Contributor

@ctucker3 ctucker3 commented Jun 1, 2022

Description

Story: https://breedinginsight.atlassian.net/jira/software/c/projects/BI/boards/1?modal=detail&selectedIssue=BI-1438

Added a check after the user comes back from logging to to check if the path they are being sent to is valid. Sends them to the home page if it isn't valid.

Note: The url will show the bad url before navigating to the actual url. There is no page flash though since the bad url is caught before entering the route. We would need to implement this check on the backend to not have that url shown, which I don't think is feasible.

Dependencies

biapi: develop

Testing

  1. Make sure you're not logged in
  2. Go to http://localhost:8080/noexist
  3. You should be sent to the home screen
  4. Log in
  5. You should be sent to the home screen after logging in.
  6. Try to go to a page that doesn't exist
  7. You should see a "Page Does Not Exist" message.
  8. Log out.
  9. Repeat steps except this time navigate to a page that does exist and make sure the redirect takes you there.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <link to TAF run>

@github-actions github-actions bot added the bug Something isn't working label Jun 1, 2022
@ctucker3 ctucker3 requested review from a team, dmeidlin and HMS17 and removed request for a team June 1, 2022 16:35
@ctucker3 ctucker3 merged commit d05b781 into develop Jun 6, 2022
@ctucker3 ctucker3 deleted the bug/BI-1438 branch June 6, 2022 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants