mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
This reverts commit c8e299c8f1
.
This commit is contained in:
18
coderd/flags.go
Normal file
18
coderd/flags.go
Normal file
@ -0,0 +1,18 @@
|
||||
package coderd
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/coder/coder/cli/deployment"
|
||||
"github.com/coder/coder/coderd/httpapi"
|
||||
"github.com/coder/coder/coderd/rbac"
|
||||
)
|
||||
|
||||
func (api *API) deploymentFlags(rw http.ResponseWriter, r *http.Request) {
|
||||
if !api.Authorize(r, rbac.ActionRead, rbac.ResourceDeploymentFlags) {
|
||||
httpapi.Forbidden(rw)
|
||||
return
|
||||
}
|
||||
|
||||
httpapi.Write(r.Context(), rw, http.StatusOK, deployment.RemoveSensitiveValues(*api.DeploymentFlags))
|
||||
}
|
Reference in New Issue
Block a user