Skip to content

chore: Optimize rego policy input allocations #6135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comment
  • Loading branch information
Emyrk committed Feb 9, 2023
commit 407b236c87601febdeea07f48e8712f1f881468a
2 changes: 2 additions & 0 deletions coderd/rbac/astvalue.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func regoInputValue(subject Subject, action Action, object Object) (ast.Value, e
return input, nil
}

// regoPartialInputValue is the same as regoInputValue but only includes the
// object type. This is for partial evaluations.
func regoPartialInputValue(subject Subject, action Action, objectType string) (ast.Value, error) {
regoSubj, err := subject.regoValue()
if err != nil {
Expand Down