mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
fix: add GetMaskedRoles and GetMaskedPermissions when GetAccount (#1456)
This commit is contained in:
@ -192,3 +192,11 @@ func roleChangeTrigger(oldName string, newName string) error {
|
||||
|
||||
return session.Commit()
|
||||
}
|
||||
|
||||
func GetMaskedRoles(roles []*Role) []*Role {
|
||||
for _, role := range roles {
|
||||
role.Users = nil
|
||||
}
|
||||
|
||||
return roles
|
||||
}
|
||||
|
Reference in New Issue
Block a user