mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: Rewrite rbac rego -> SQL clause (#5138)
* chore: Rewrite rbac rego -> SQL clause Previous code was challenging to read with edge cases - bug: OrgAdmin could not make new groups - Also refactor some function names
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac/regosql"
|
||||
"github.com/coder/coder/coderd/tracing"
|
||||
)
|
||||
|
||||
@ -20,7 +21,7 @@ type Authorizer interface {
|
||||
|
||||
type PreparedAuthorized interface {
|
||||
Authorize(ctx context.Context, object Object) error
|
||||
Compile() (AuthorizeFilter, error)
|
||||
CompileToSQL(cfg regosql.ConvertConfig) (string, error)
|
||||
}
|
||||
|
||||
// Filter takes in a list of objects, and will filter the list removing all
|
||||
|
Reference in New Issue
Block a user