Skip to content

Commit 797e749

Browse files
committed
SQL filter does not generate authz calls
1 parent da9c525 commit 797e749

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

coderd/authzquery/workspace_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func TestWorkspaceFunctions(t *testing.T) {
6969
require.NoError(t, err)
7070
},
7171
Asserts: map[string][]rbac.Action{
72-
// No rbac checks for this one, uses sql filter
72+
// SQL filter does not generate authz calls
7373
},
7474
},
7575
},

coderd/coderdtest/authorize.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ type fakePreparedAuthorizer struct {
662662
}
663663

664664
func (f *fakePreparedAuthorizer) Authorize(ctx context.Context, object rbac.Object) error {
665-
return f.Original.Authorize(ctx, f.Subject, f.Action, object)
665+
return f.Original.AuthorizeSQL(ctx, f.Subject, f.Action, object)
666666
}
667667

668668
// CompileToSQL returns a compiled version of the authorizer that will work for

0 commit comments

Comments
 (0)