Browse Source

bugfix: auto reload Authorized (#5448)

ref #5416
pull/5448/merge
huishan 7 years ago
committed by 陈帅
parent
commit
5421488dfc
  1. 2
      src/utils/authority.ts

2
src/utils/authority.ts

@ -27,7 +27,7 @@ export function getAuthority(str?: string): string | string[] {
export function setAuthority(authority: string | string[]): void {
const proAuthority = typeof authority === 'string' ? [authority] : authority;
localStorage.setItem('antd-pro-authority', JSON.stringify(proAuthority));
// auto reload
reloadAuthorized();
return localStorage.setItem('antd-pro-authority', JSON.stringify(proAuthority));
}

Loading…
Cancel
Save