import { reloadAuthorized } from './Authorized'; // use localStorage to store the authority info, which might be sent from server in actual project.

let roles = []

export function getAuthority() {
  return roles || [];
}
export function setAuthority(authority = []) {
  roles = typeof authority === 'string' ? [authority] : authority;
  
  reloadAuthorized();
}
