authority.js 308 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() {
jim's avatar
jim committed
3
  return localStorage.getItem('antd-pro-authority') || 'admin';
ddcat1115's avatar
ddcat1115 committed
4 5 6 7 8
}

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