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

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