8000 feat: add members settings page for organizations by aslilac · Pull Request #13817 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: add members settings page for organizations #13817

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 22 commits into from
Jul 16, 2024
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
8000
Prev Previous commit
Next Next commit
split out the body stuff into a different branch
  • Loading branch information
aslilac committed Jul 10, 2024
commit 608ea6972502f546d1b41602ab47f70526c541e3
7 changes: 5 additions & 2 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions coderd/apidoc/swagger.json
8000

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/apikey.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (api *API) deleteAPIKey(rw http.ResponseWriter, r *http.Request) {
return
}

rw.WriteHeader(http.StatusNoContent)
httpapi.Write(ctx, rw, http.StatusNoContent, nil)
}

// @Summary Get token config
Expand Down
2 changes: 1 addition & 1 deletion coderd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (api *API) putDeploymentHealthSettings(rw http.ResponseWriter, r *http.Requ

if bytes.Equal(settingsJSON, []byte(currentSettingsJSON)) {
// See: https://www.rfc-editor.org/rfc/rfc7231#section-6.3.5
rw.WriteHeader(http.StatusNoContent)
httpapi.Write(r.Context(), rw, http.StatusNoContent, nil)
return
}

Expand Down
2 changes: 1 addition & 1 deletion coderd/externalauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (api *API) postExternalAuthDeviceByID(rw http.ResponseWriter, r *http.Reque
return
}
}
rw.WriteHeader(http.StatusNoContent)
httpapi.Write(ctx, rw, http.StatusNoContent, nil)
}

// @Summary Get external auth device by ID.
Expand Down
2 changes: 1 addition & 1 deletion coderd/identityprovider/revoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ func RevokeApp(db database.Store) http.HandlerFunc {
httpapi.InternalServerError(rw, err)
return
}
rw.WriteHeader(http.StatusNoContent)
httpapi.Write(ctx, rw, http.StatusNoContent, nil)
}
}
4 changes: 2 additions & 2 deletions coderd/oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (api *API) deleteOAuth2ProviderApp(rw http.ResponseWriter, r *http.Request)
})
return
}
rw.WriteHeader(http.StatusNoContent)
httpapi.Write(ctx, rw, http.StatusNoContent, nil)
}

// @Summary Get OAuth2 application secrets.
Expand Down Expand Up @@ -324,7 +324,7 @@ func (api *API) deleteOAuth2ProviderAppSecret(rw http.ResponseWriter, r *http.Re
})
return
}
rw.WriteHeader(http.StatusNoContent)
httpapi.Write(ctx, rw, http.StatusNoContent, nil)
}

// @Summary OAuth2 authorization request.
Expand Down
2 changes: 1 addition & 1 deletion coderd/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ func (api *API) patchTemplateMeta(rw http.ResponseWriter, r *http.Request) {

if updated.UpdatedAt.IsZero() {
aReq.New = template
rw.WriteHeader(http.StatusNotModified)
httpapi.Write(ctx, rw, http.StatusNotModified, nil)
return
}
aReq.New = updated
Expand Down
8 changes: 5 additions & 3 deletions coderd/users.go
F438
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ func (api *API) postUser(rw http.ResponseWriter, r *http.Request) {
// @Produce json
// @Tags Users
// @Param user path string true "User ID, name, or me"
// @Success 204
// @Success 200 {object} codersdk.User
// @Router /users/{user} [delete]
func (api *API) deleteUser(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
Expand Down Expand Up @@ -558,7 +558,9 @@ func (api *API) deleteUser(rw http.ResponseWriter, r *http.Request) {
}
user.Deleted = true
aReq.New = user
rw.WriteHeader(http.StatusNoContent)
httpapi.Write(ctx, rw, http.StatusOK, codersdk.Response{
Message: "User has been deleted!",
})
}

// Returns the parameterized user requested. All validation
Expand Down Expand Up @@ -1011,7 +1013,7 @@ func (api *API) putUserPassword(rw http.ResponseWriter, r *http.Request) {
newUser.HashedPassword = []byte(hashedPassword)
aReq.New = newUser

rw.WriteHeader(http.StatusNoContent)
httpapi.Write(ctx, rw, http.StatusNoContent, nil)
}

// @Summary Get user roles
Expand Down
4 changes: 3 additions & 1 deletion coderd/workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,9 @@ func (api *API) putWorkspaceDormant(rw http.ResponseWriter, r *http.Request) {

// If the workspace is already in the desired state do nothing!
if workspace.DormantAt.Valid == req.Dormant {
rw.WriteHeader(http.StatusNotModified)
httpapi.Write(ctx, rw, http.StatusNotModified, codersdk.Response{
Message: "Nothing to do!",
})
return
}

Expand Down
34 changes: 31 additions & 3 deletions docs/api/users.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
0