Add user_is_admin
flag to app store, plus logic to set/clear it
This commit is contained in:
parent
a80a42fb56
commit
3c4e9567a9
4 changed files with 24 additions and 2 deletions
|
@ -43,6 +43,7 @@ export default {
|
|||
|
||||
// let all of app know who the user is(n't)
|
||||
this.$store.commit('SET_USER', response.data.user)
|
||||
this.$store.commit('SET_USER_IS_ADMIN', response.data.user ? response.data.user.is_admin : false)
|
||||
this.$store.commit('SET_USER_IS_ROOT', response.data.user ? response.data.user.is_root : false)
|
||||
|
||||
// also keep track of user's permissions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue