Skip to content

chore: fill out workspace owner data for dynamic parameters #17366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
strings tho
  • Loading branch information
aslilac committed Apr 17, 2025
commit e9d235db428af7a61bf0eb5a46d0e222403021d1
11 changes: 9 additions & 2 deletions coderd/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,16 @@ func (api *API) getWorkspaceOwnerData(
}
ownerRoles = make([]previewtypes.WorkspaceOwnerRBACRole, 0, len(roles))
for _, it := range roles {
if it.OrganizationID != uuid.Nil && it.OrganizationID != organizationID {
continue
}
var orgID string
if it.OrganizationID != uuid.Nil {
orgID = it.OrganizationID.String()
}
ownerRoles = append(ownerRoles, previewtypes.WorkspaceOwnerRBACRole{
Name: it.Name,
OrgID: it.OrganizationID,
OrgID: orgID,
})
}
return nil
Expand Down Expand Up @@ -231,7 +238,7 @@ func (api *API) getWorkspaceOwnerData(
}

return previewtypes.WorkspaceOwner{
ID: user.ID,
ID: user.ID.String(),
Name: user.Username,
FullName: user.Name,
Email: user.Email,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ require (
)

require (
github.com/coder/preview v0.0.0-20250415184318-1998a47f687e
github.com/coder/preview v0.0.0-20250417203026-7edcb9e02d99
github.com/kylecarbs/aisdk-go v0.0.5
github.com/mark3labs/mcp-go v0.20.1
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,8 @@ github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048 h1:3jzYUlGH7ZELIH4XggX
github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 h1:3A0ES21Ke+FxEM8CXx9n47SZOKOpgSE1bbJzlE4qPVs=
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0/go.mod h1:5UuS2Ts+nTToAMeOjNlnHFkPahrtDkmpydBen/3wgZc=
github.com/coder/preview v0.0.0-20250415184318-1998a47f687e h1:qFeANfX24rGoGJwGqirYKD1QNp4EOWz2GpI81zdOjRY=
github.com/coder/preview v0.0.0-20250415184318-1998a47f687e/go.mod h1:HqHMj1omTQfg4Kg5mjvHgKrraFnww6S7MN2+4d6MDyg=
github.com/coder/preview v0.0.0-20250417203026-7edcb9e02d99 h1:ek8akG49hG304Dsj6T+k8qd4t4rEjUyJ97EiQ9xqkYA=
github.com/coder/preview v0.0.0-20250417203026-7edcb9e02d99/go.mod h1:nyq3UKfaBu4jmA6ddJH05kD5K6paHEMLpRmwLdYJctU=
github.com/coder/quartz v0.1.2 h1:PVhc9sJimTdKd3VbygXtS4826EOCpB1fXoRlLnCrE+s=
github.com/coder/quartz v0.1.2/go.mod h1:vsiCc+AHViMKH2CQpGIpFgdHIEQsxwm8yCscqKmzbRA=
github.com/coder/retry v1.5.1 h1:iWu8YnD8YqHs3XwqrqsjoBTAVqT9ml6z9ViJ2wlMiqc=
Expand Down
Loading