Skip to content

Commit 21a6f6a

Browse files
committed
api: skip Authorize if codersdk.ExperimentAuthzQuerier enabled
1 parent 5928c37 commit 21a6f6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

coderd/authorize.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ type HTTPAuthorizer struct {
5151
// return
5252
// }
5353
func (api *API) Authorize(r *http.Request, action rbac.Action, object rbac.Objecter) bool {
54+
if api.Experiments.Enabled(codersdk.ExperimentAuthzQuerier) {
55+
return true
56+
}
5457
return api.HTTPAuth.Authorize(r, action, object)
5558
}
5659

0 commit comments

Comments
 (0)