fix: update WorkspaceOwnerName to use user.name instead of user.username (#18025)

We have been using the user.username instead of user.name in wrong
places, making it very confusing for the UI.
This commit is contained in:
Bruno Quaresma
2025-05-27 11:42:07 -03:00
committed by GitHub
parent 9827c97f32
commit d63417b542
24 changed files with 579 additions and 90 deletions

View File

@ -531,6 +531,7 @@ func (q *FakeQuerier) convertToWorkspaceRowsNoLock(ctx context.Context, workspac
OwnerAvatarUrl: extended.OwnerAvatarUrl,
OwnerUsername: extended.OwnerUsername,
OwnerName: extended.OwnerName,
OrganizationName: extended.OrganizationName,
OrganizationDisplayName: extended.OrganizationDisplayName,
@ -628,6 +629,7 @@ func (q *FakeQuerier) extendWorkspace(w database.WorkspaceTable) database.Worksp
return u.ID == w.OwnerID
})
extended.OwnerUsername = owner.Username
extended.OwnerName = owner.Name
extended.OwnerAvatarUrl = owner.AvatarURL
return extended