display users and roles

This commit is contained in:
Julian Krauser 2024-09-01 14:54:49 +02:00
parent eff79a4697
commit 2d0fb30558
12 changed files with 330 additions and 14 deletions

View file

@ -56,6 +56,7 @@ export const useNavigationStore = defineStore("navigation", {
if (!disableSubLink) this.setLink(level.levelDefault);
else this.setLink(null);
}
this.resetComponentOverwrite();
},
setLink(key: string | null) {
let nav = this.navigation[this.activeNavigation];
@ -65,6 +66,7 @@ export const useNavigationStore = defineStore("navigation", {
}
let links = [...Object.values(nav.main), ...Object.values(nav.top ?? {})];
this.activeLink = links.find((e) => e.key == key) ?? null;
this.resetComponentOverwrite();
},
setTopLevelNav(topLeveLinks: Array<topLevelNavigationModel>) {
this.topLevel = topLeveLinks;
@ -209,12 +211,12 @@ export const useNavigationStore = defineStore("navigation", {
},
]
: []),
...(abilityStore.can("admin", "user", "role")
...(abilityStore.can("read", "user", "role")
? [
{
key: "#role",
title: "Rollen",
component: shallowRef(defineAsyncComponent(() => import("@/views/admin/members/Overview.vue"))),
component: shallowRef(defineAsyncComponent(() => import("@/views/admin/user/Role.vue"))),
},
]
: []),