mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
authorities
This commit is contained in:
parent
8b88dc07ff
commit
fe737726a1
@ -59,6 +59,15 @@ func GetUser(userID string) (*system.User, error) {
|
||||
|
||||
user.RoleID = role.ID
|
||||
user.RoleName = role.Name
|
||||
user.OperatingAuthorities = []string{}
|
||||
|
||||
if role.Name == "Administrator" {
|
||||
for _, item := range GetAllOperatingAuthorities() {
|
||||
user.OperatingAuthorities = append(user.OperatingAuthorities, item.ID)
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user