From 4b9c0f6886a224bef5c4f15f0b30adfb65a37fa1 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 14 Jun 2022 10:47:59 -0500 Subject: [PATCH 1/2] Fix compilation error on merge --- coderd/workspaces.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coderd/workspaces.go b/coderd/workspaces.go index 3dd31fc7d5e00..8015daf97bfa6 100644 --- a/coderd/workspaces.go +++ b/coderd/workspaces.go @@ -261,7 +261,8 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req return } - if !api.Authorize(rw, r, rbac.ActionRead, template) { + if !api.Authorize(r, rbac.ActionRead, template) { + httpapi.ResourceNotFound(rw) return } From b493b6c552f7a8b82aeb487a9cf796fa1bada816 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 14 Jun 2022 10:51:46 -0500 Subject: [PATCH 2/2] Import fmt on unit test --- coderd/workspaces_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/coderd/workspaces_test.go b/coderd/workspaces_test.go index 5e111a4e04962..22b236d00bd17 100644 --- a/coderd/workspaces_test.go +++ b/coderd/workspaces_test.go @@ -2,6 +2,7 @@ package coderd_test import ( "context" + "fmt" "net/http" "strings" "testing"