transfer Ownership

This commit is contained in:
Julian Krauser 2024-11-21 15:58:58 +01:00
parent 8f23a688cb
commit 0fb7a563d0
10 changed files with 195 additions and 10 deletions

View file

@ -22,3 +22,16 @@ export async function abilityAndNavUpdate(to: any, from: any, next: any) {
next(false);
}
}
export async function isOwner(to: any, from: any, next: any) {
NProgress.start();
const ability = useAbilityStore();
if (ability.isOwner) {
NProgress.done();
next();
} else {
NProgress.done();
next(false);
}
}