-
Notifications
You must be signed in to change notification settings - Fork 713
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
Redirect for Bookmarks when user is not logged in #9142
Redirect for Bookmarks when user is not logged in #9142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @sairina, it's definitely better than it was. It would be good to resolve the issues mentioned above before merging.
ee5de0a
to
eb7cd94
Compare
eb7cd94
to
fcc472e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is best targeted in LearnIndex at the moment, not in the router - router guards are best used to redirect to other pages, not conditionalize behaviour within a page.
f1fcc63
to
cf73708
Compare
@@ -95,6 +95,9 @@ | |||
...mapState('examReportViewer', ['exam']), | |||
...mapState(['pageName']), | |||
userIsAuthorized() { | |||
if (this.pageName === PageNames.BOOKMARKS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delightfully simple!
Summary
Added a check to see whether or not a user is logged in. If a user is not logged in, they are redirected to the "content unavailable" view.
References
Fixes #9057
Reviewer guidance
Follow the guidance from the original issue:
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)