patches v1.3.2 #71

Merged
jkeffects merged 15 commits from develop into main 2025-03-12 08:52:40 +00:00
2 changed files with 6 additions and 4 deletions
Showing only changes of commit 8033038c2e - Show all commits

View file

@ -7,15 +7,15 @@ export async function abilityAndNavUpdate(to: any, from: any, next: any) {
const ability = useAbilityStore();
const navigation = useNavigationStore();
let admin = to.meta.admin || false;
let type = to.meta.type;
let section = to.meta.section;
let module = to.meta.module;
if ((admin && ability.isAdmin()) || ability.can(type, section, module)) {
NProgress.done();
navigation.activeNavigation = to.name.split("-")[1];
navigation.activeLink = to.name.split("-")[2];
if (ability.can(type, section, module)) {
NProgress.done();
next();
} else {
NProgress.done();

View file

@ -665,6 +665,8 @@ const router = createRouter({
path: "version",
name: "admin-user-version",
component: () => import("@/views/admin/management/version/VersionDisplay.vue"),
meta: { admin: true },
beforeEnter: [abilityAndNavUpdate],
},
],
},