transfer Ownership
This commit is contained in:
parent
8f23a688cb
commit
0fb7a563d0
10 changed files with 195 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue