fix: marshal displayname RoleDTO (#40015)

This commit is contained in:
Eric Leijonmarck 2021-10-05 15:29:34 +01:00 committed by GitHub
parent 52220b2470
commit 5374eaca89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,7 @@ func (r RoleDTO) GetDisplayName() string {
func (r RoleDTO) MarshalJSON() ([]byte, error) {
type Alias RoleDTO
r.DisplayName = r.GetDisplayName()
return json.Marshal(&struct {
Alias
Global bool `json:"global" xorm:"-"`