mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-25 05:50:18 +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