feat: fallback for displayname of non-fixed role without displayname (#40277)

This commit is contained in:
Eric Leijonmarck 2021-10-11 16:00:54 +01:00 committed by GitHub
parent 24af3593a2
commit b88cd08177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,9 @@ func (r RoleDTO) GetDisplayName() string {
if r.IsFixed() && r.DisplayName == "" {
r.DisplayName = fallbackDisplayName(r.Name)
}
if r.DisplayName == "" {
return r.Name
}
return r.DisplayName
}