Skip to content

Commit a9a05d4

Browse files
committed
Enable RBAC
1 parent 750cfc3 commit a9a05d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

coderd/workspacebuilds.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,13 @@ func (api *API) postWorkspaceBuilds(rw http.ResponseWriter, r *http.Request) {
545545
}
546546
}
547547

548+
if createBuild.LogLevel != "" && !api.Authorize(r, rbac.ActionUpdate, template) {
549+
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
550+
Message: "Workspace builds with a custom log level are restricted to template authors only.",
551+
})
552+
return
553+
}
554+
548555
var workspaceBuild database.WorkspaceBuild
549556
var provisionerJob database.ProvisionerJob
550557
// This must happen in a transaction to ensure history can be inserted, and

0 commit comments

Comments
 (0)