Skip to content

Commit 4300414

Browse files
committed
Fix authorize tests
1 parent 764a596 commit 4300414

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

coderd/coderdtest/authorize.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,12 @@ func AGPLRoutes(a *AuthTester) (map[string]string, map[string]RouteCheck) {
235235
"GET:/api/v2/applications/auth-redirect": {AssertAction: rbac.ActionCreate, AssertObject: rbac.ResourceAPIKey},
236236

237237
// These endpoints need payloads to get to the auth part. Payloads will be required
238-
"PUT:/api/v2/users/{user}/roles": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
239-
"PUT:/api/v2/organizations/{organization}/members/{user}/roles": {NoAuthorize: true},
240-
"POST:/api/v2/workspaces/{workspace}/builds": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
241-
"POST:/api/v2/organizations/{organization}/templateversions": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
242-
"GET:/api/v2/organizations/{organization}/templateversions/{templateversionname}": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
238+
"PUT:/api/v2/users/{user}/roles": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
239+
"PUT:/api/v2/organizations/{organization}/members/{user}/roles": {NoAuthorize: true},
240+
"POST:/api/v2/workspaces/{workspace}/builds": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
241+
"POST:/api/v2/organizations/{organization}/templateversions": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
242+
"GET:/api/v2/organizations/{organization}/templateversions/{templateversionname}": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
243+
"GET:/api/v2/organizations/{organization}/templateversions/{templateversionname}/previous": {StatusCode: http.StatusBadRequest, NoAuthorize: true},
243244

244245
// Endpoints that use the SQLQuery filter.
245246
"GET:/api/v2/workspaces/": {

0 commit comments

Comments
 (0)