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