-
Notifications
You must be signed in to change notification settings - Fork 156
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
Reset store on logout #6694
Reset store on logout #6694
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
Results for oC10Files3 https://drone.owncloud.com/owncloud/web/24286/18/1 💥 The acceptance tests pipeline failed. The build has been cancelled. |
Fails as the redirect with OAuth2 in combination with OC10 fails with these changes. I'll try to take a look with @kulmann tomorrow |
546ca67
to
bbd3abd
Compare
@kulmann implemented an action for clearing dynamic items as you asked, testing by us with switching between different accounts works correctly. |
Hm. 🤔 it needs at least a rebase to pass CI. But I see another issue: The oCIS settings service UI adds dynamic nav items and there is no logic in your PR for re-adding certain dynamic nav items. See https://github.com/owncloud/ocis/blob/44e8b6e7be947efcabda1074776c045164021cf3/extensions/settings/ui/components/SettingsApp.vue#L106 |
bbd3abd
to
c0b3db7
Compare
Kudos, SonarCloud Quality Gate passed! |
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.
Turns out that clearing the dynamic nav items is ok. The ADD_NAV_ITEM
mutation in the web runtime is implemented in a way that allows setting the same nav item again over and over. In fact, all known apps use the dynamic nav item init during render time, thus they already get re-created when needed.
Thank you for the contribution! 🤩
Description
When logging out, only some parts of vuex store were reset to default. This caused bugs by switching to another account that has some other/missing settings. For example, if the account has no quota, the quota of the previously logged in account was shown. We have fixed this by resetting the store on logout with reset function (vuex extensions library).
Related Issue
How Has This Been Tested?
logging in, logging out, logging in
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: