authority.js 308 Bytes
Newer Older
ddcat1115's avatar
ddcat1115 committed
1 2 3 4 5 6 7 8
// use localStorage to store the authority info, which might be sent from server in actual project.
export function getAuthority() {
  return localStorage.getItem('antd-pro-authority') || 'guest';
}

export function setAuthority(authority) {
  return localStorage.setItem('antd-pro-authority', authority);
}