mirror of https://github.com/coder/coder.git
18 lines
376 B
Go
18 lines
376 B
Go
|
package coderd
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
"github.com/coder/coder/coderd/httpapi"
|
||
|
"github.com/coder/coder/coderd/rbac"
|
||
|
)
|
||
|
|
||
|
func (api *API) deploymentConfig(rw http.ResponseWriter, r *http.Request) {
|
||
|
if !api.Authorize(r, rbac.ActionRead, rbac.ResourceDeploymentConfig) {
|
||
|
httpapi.Forbidden(rw)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
httpapi.Write(r.Context(), rw, http.StatusOK, api.DeploymentConfig)
|
||
|
}
|