-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Editor]: Allow logging out #1039
Conversation
Affected libs:
|
📷 Screenshots are here! |
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.
Thanks Camille for implementing a log out functionality, it will be important for the users! 🎉
I found some little things which I think need to be changed/ reviewed again. I haven't manually tested the functionality yet.
Let me know if something is not clear.
apps/metadata-editor/src/app/dashboard/sidebar/sidebar.component.html
Outdated
Show resolved
Hide resolved
apps/metadata-editor/src/app/dashboard/sidebar/sidebar.component.ts
Outdated
Show resolved
Hide resolved
apps/metadata-editor/src/app/dashboard/sidebar/sidebar.component.spec.ts
Outdated
Show resolved
Hide resolved
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.
Thanks @cmoinier the PR looks good!
I still have some doubts about setting the url (after logout) to the url that was present during log in. But maybe I did not understand it correctly.
Can you have another look?
apps/metadata-editor/src/app/dashboard/sidebar/sidebar.component.ts
Outdated
Show resolved
Hide resolved
@cmoinier GeoNetwork offers a logout service similar to the login one, which a redirect option. For instance this is what it can look like: |
I precisely tried that in the first place 🙁 But it kept bringing me back to the login page with an error saying the credentials are wrong... No idea why though! This is why I opted for a request rather than a redirect because then I didn't get that strange error |
Oh right, actually it makes sense that it puts you again on the login form once you log out, because trying to access the editor while not logged in will redirect you to the login form... Your solution is the best I think! |
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.
@cmoinier sorry for the back and forth. I was wrong with not keeping the previous URL.
Good job! 🚀
Description
This PR adds the logging out logic to the sidebar button in the editor.
When the user clicks on the logout button, the session ends and the user is redirected to the logging page.
Quality Assurance Checklist
breaking change
labelbackport <release branch>
label