fix: add GetMaskedRoles and GetMaskedPermissions when GetAccount (#1456)

This commit is contained in:
June
2023-01-05 23:02:52 +07:00
committed by GitHub
parent c8846f1a2d
commit dcf148fb7f
3 changed files with 20 additions and 0 deletions

View File

@ -269,3 +269,12 @@ func ContainsAsterisk(userId string, users []string) bool {
return containsAsterisk
}
func GetMaskedPermissions(permissions []*Permission) []*Permission {
for _, permission := range permissions {
permission.Users = nil
permission.Submitter = ""
}
return permissions
}