Skip to content

Commit

Permalink
fix decisiontree path_root (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
gertd authored Nov 11, 2022
1 parent 5f4ad59 commit e88af35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/app/impl/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,13 @@ func (s *AuthorizerServer) DecisionTree(ctx context.Context, req *authorizer.Dec

results := make(map[string]interface{})

policyContext := proto.Clone(req.PolicyContext).(*api.PolicyContext)

for _, policy := range policyList {
queryStmt := "x = data." + policy.PackageName

req.PolicyContext.Path = policy.PackageName
input[InputPolicy] = req.PolicyContext
policyContext.Path = policy.PackageName
input[InputPolicy] = policyContext

qry, err := rego.New(
rego.Compiler(policyRuntime.GetPluginsManager().GetCompiler()),
Expand Down

0 comments on commit e88af35

Please sign in to comment.