Skip to content

Commit 5eb3e1c

Browse files
authored
feat: expose owner_name in coder_workspace resource (#11639)
1 parent b173195 commit 5eb3e1c

40 files changed

+353
-146
lines changed

cli/testdata/coder_users_list_--output_json.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"id": "[first user ID]",
44
"username": "testuser",
5+
"name": "",
56
"email": "testuser@coder.com",
67
"created_at": "[timestamp]",
78
"last_seen_at": "[timestamp]",
@@ -22,6 +23,7 @@
2223
{
2324
"id": "[second user ID]",
2425
"username": "testuser2",
26+
"name": "",
2527
"email": "testuser2@coder.com",
2628
"created_at": "[timestamp]",
2729
"last_seen_at": "[timestamp]",

coderd/apidoc/docs.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/db2sdk/db2sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ func User(user database.User, organizationIDs []uuid.UUID) codersdk.User {
120120
convertedUser := codersdk.User{
121121
ID: user.ID,
122122
Email: user.Email,
123+
Name: user.Name,
123124
CreatedAt: user.CreatedAt,
124125
LastSeenAt: user.LastSeenAt,
125126
Username: user.Username,

coderd/database/dbmem/dbmem.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6693,6 +6693,7 @@ func (q *FakeQuerier) UpdateUserProfile(_ context.Context, arg database.UpdateUs
66936693
user.Email = arg.Email
66946694
user.Username = arg.Username
66956695
user.AvatarURL = arg.AvatarURL
6696+
user.Name = arg.Name
66966697
q.users[index] = user
66976698
return user, nil
66986699
}

coderd/database/dump.sql

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE users DROP COLUMN name;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ALTER TABLE users ADD COLUMN name text NOT NULL DEFAULT '';
2+
3+
COMMENT ON COLUMN users.name IS 'Name of the Coder user';
4+

coderd/database/modelqueries.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ func (q *sqlQuerier) GetAuthorizedUsers(ctx context.Context, arg GetUsersParams,
318318
&i.LastSeenAt,
319319
&i.QuietHoursSchedule,
320320
&i.ThemePreference,
321+
&i.Name,
321322
&i.Count,
322323
); err != nil {
323324
return nil, err

coderd/database/models.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy