完善授权凭证授权

This commit is contained in:
dushixiang
2021-01-15 19:17:10 +08:00
parent f4ec963f85
commit f38c77c202
11 changed files with 261 additions and 58 deletions

View File

@ -0,0 +1,9 @@
export function hasPermission(owner) {
let userJsonStr = sessionStorage.getItem('user');
let user = JSON.parse(userJsonStr);
if (user['role'] === 'admin') {
return true;
}
return user['id'] === owner;
}