Skip to content

Commit 4734636

Browse files
authored
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
1 parent c28b7ec commit 4734636

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

coderd/workspaces.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req
263263
return
264264
}
265265

266-
if !api.Authorize(rw, r, rbac.ActionRead, template) {
266+
if !api.Authorize(r, rbac.ActionRead, template) {
267+
httpapi.ResourceNotFound(rw)
267268
return
268269
}
269270

coderd/workspaces_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package coderd_test
22

33
import (
44
"context"
5+
"fmt"
56
"net/http"
67
"strings"
78
"testing"

0 commit comments

Comments
 (0)