Skip to content

chore: implement deleting custom roles #14101

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 9 commits into from
Aug 7, 2024
Merged
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
Next Next commit
chore: add comments to explain populated field
  • Loading branch information
Emyrk committed Aug 7, 2024
commit 3b9790a19baa7c26d95f9079943b879bb75ab96f
6 changes: 4 additions & 2 deletions enterprise/coderd/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func (api *API) patchOrgRoles(rw http.ResponseWriter, r *http.Request) {
},
},
ExcludeOrgRoles: false,
OrganizationID: organization.ID,
// Linter requires all fields to be set. This field is not actually required.
OrganizationID: organization.ID,
})
// If it is a 404 (not found) error, ignore it.
if err != nil && !httpapi.Is404Error(err) {
Expand Down Expand Up @@ -167,7 +168,8 @@ func (api *API) deleteOrgRole(rw http.ResponseWriter, r *http.Request) {
},
},
ExcludeOrgRoles: false,
OrganizationID: organization.ID,
// Linter requires all fields to be set. This field is not actually required.
OrganizationID: organization.ID,
})
if err != nil {
httpapi.InternalServerError(rw, err)
Expand Down