mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user