From 4734636b17e4d3818d64aa55ee537cb675298677 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 14 Jun 2022 11:21:30 -0500 Subject: [PATCH] fix: compilation error on merge with Authorize call (#2319) Merge caused compilation errors. - Authorize call having too many arguments - `workspaces_test.go` missing "fmt" import --- coderd/workspaces.go | 3 ++- coderd/workspaces_test.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/coderd/workspaces.go b/coderd/workspaces.go index 36a7762b69..0ee26342ab 100644 --- a/coderd/workspaces.go +++ b/coderd/workspaces.go @@ -263,7 +263,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 } diff --git a/coderd/workspaces_test.go b/coderd/workspaces_test.go index fce15913e6..cdab39422e 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"