-
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
refactor: move vuex user to pinia #10240
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. |
c930ce2
to
cbc42c9
Compare
910b3ea
to
9dd71c7
Compare
5af5f02
to
df9d6ce
Compare
4d673dc
to
8ed50fb
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.
Awesome 😍
8ed50fb
to
870e32c
Compare
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 11 New issues |
Description
Moves the user from the vuex store to pinia.
Also removes loading the old OCS user since it now lives in the Graph API. This means that the user sitting in the store now looks a bit different. The changes are:
uuid
->id
id
->onPremisesSamAccountName
email
->mail
displayname
->displayName
groups
->memberOf
This also means that the quota is now being handled on the user's personal drive instead of on the user itself. On a drive item this looks like this:
How to
The user can be retrieved via the
useUserStore
composable like so:There is no need to unref
userStore.user
since it behaves like Vue'sreactive
. You only need to be careful when destructuring the user since it would lose reactivity. To compensate for that you can use pinia'sstoreToRefs
method:Note that you need to unref the user then though.
Related Issue
Types of changes