feat : add role guest
Auto Tag Develop / tag (push) Has been cancelled

This commit is contained in:
Lethary
2026-05-05 15:51:58 +02:00
parent 1c0cdeb085
commit fa1f0ccaa4
15 changed files with 72 additions and 21 deletions
+6 -1
View File
@@ -12,7 +12,12 @@ export const useAuthStore = defineStore('auth', {
}),
getters: {
isAuthenticated: (state) => Boolean(state.user),
isAdmin: (state) => Boolean(state.user?.roles?.includes(ROLE[0].value))
isAdmin: (state) => Boolean(state.user?.roles?.includes(ROLE[0].value)),
isGuest: (state) => Boolean(state.user?.roles?.includes('ROLE_GUEST')),
canUseWorkflow: (state) => Boolean(
state.user?.roles?.includes(ROLE[0].value) ||
state.user?.roles?.includes('ROLE_USER')
)
},
actions: {
clearSession() {