mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): add auth example
This commit is contained in:
@ -10,10 +10,16 @@ export function getUserInfo() {
|
||||
const emptyInfo: Api.Auth.UserInfo = {
|
||||
userId: '',
|
||||
userName: '',
|
||||
roles: []
|
||||
roles: [],
|
||||
buttons: []
|
||||
};
|
||||
const userInfo = localStg.get('userInfo') || emptyInfo;
|
||||
|
||||
// fix new property: buttons, this will be removed in the next version `1.1.0`
|
||||
if (!userInfo.buttons) {
|
||||
userInfo.buttons = [];
|
||||
}
|
||||
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user