이용내역 권한 관련
This commit is contained in:
10
src/shared/lib/check-grant.ts
Normal file
10
src/shared/lib/check-grant.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useStore } from "../model/store";
|
||||
|
||||
export const checkGrant = (menuId?: number, authType: string = 'R') => {
|
||||
const menuGrantsByKey = useStore.getState().UserStore.menuGrantsByKey;
|
||||
const myGrants = menuGrantsByKey['' + menuId];
|
||||
if(myGrants?.includes(authType) || menuId === -1){
|
||||
return true
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user