yuan_yi
3 years ago
2 changed files with 3 additions and 7 deletions
@ -1,14 +1,10 @@ |
|||
'use strict'; |
|||
|
|||
const isAuthorized = (authcode) => { |
|||
export const isAuthorized = (authcode) => { |
|||
if (JSON.parse(sessionStorage.getItem('user'))) { |
|||
const { resources } = JSON.parse(sessionStorage.getItem('user')); |
|||
return resources.includes(authcode); |
|||
} else { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
export default{ |
|||
isAuthorized |
|||
} |
Loading…
Reference in new issue