dev: hotfix, system by-passes role-access
This commit is contained in:
No files matched your search
+4
-1
@@ -7,7 +7,10 @@ export const useUserStore = defineStore(
|
||||
const isAuthenticated = computed(() => !!user.value)
|
||||
const userRole = computed(() => {
|
||||
const roles = user.value?.roles || []
|
||||
return roles.map((v) => v.split('-')[1])
|
||||
return roles.map((input: string) => {
|
||||
const parts = input.split('-')
|
||||
return parts.length > 1 ? parts[1]: parts[0]
|
||||
})
|
||||
})
|
||||
|
||||
const login = async (userData: any) => {
|
||||
|
||||
Reference in New Issue
Block a user