chore: Merge some rbac files, move some functions around (#6916)

* chore: Merge some rbac files, move some functions around

* Fix imports
This commit is contained in:
Steven Masley
2023-03-31 09:46:38 -05:00
committed by GitHub
parent 27e17ff2c3
commit ce51435507
8 changed files with 203 additions and 223 deletions

View File

@ -1,7 +1,6 @@
package rbac
import (
"context"
"strings"
"github.com/coder/coder/coderd/rbac/regosql"
@ -55,10 +54,6 @@ func Compile(cfg regosql.ConvertConfig, pa *PartialAuthorizer) (AuthorizeFilter,
}, nil
}
func (a *authorizedSQLFilter) Eval(object Object) bool {
return a.auth.Authorize(context.Background(), object) == nil
}
func (a *authorizedSQLFilter) SQLString() string {
return a.sqlString
}