Skip to content

Commit

Permalink
fix: rename into (#142)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Oct 27, 2023
1 parent 5112849 commit 0d3458e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ spec:
Team: ($expectedTeam)
```
Finally, we can always access the current resource, policy and rule being evaluated using the builtin `$resource`, `$policy` and `$rule` bindings. No protection is made to prevent you from overriding those bindings though.
Finally, we can always access the current payload, policy and rule being evaluated using the builtin `$payload`, `$policy` and `$rule` bindings. No protection is made to prevent you from overriding those bindings though.

#### Escaping projection

Expand Down
2 changes: 1 addition & 1 deletion pkg/json-engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func New() engine.Engine[JsonEngineRequest, JsonEngineResponse] {
var requests []request
bindings := jpbinding.NewBindings()
for _, resource := range r.Resources {
bindings = bindings.Register("$resource", jpbinding.NewBinding(resource))
bindings = bindings.Register("$payload", jpbinding.NewBinding(resource))
for _, policy := range r.Policies {
bindings = bindings.Register("$policy", jpbinding.NewBinding(policy))
for _, rule := range policy.Spec.Rules {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The current resource, policy and rule are always available using the following b

| Binding | Usage |
|---|---|
| `$resource` | Current resource being analysed |
| `$payload` | Current payload being analysed |
| `$policy` | Current policy being executed |
| `$rule` | Current rule being evaluated |

Expand Down
2 changes: 1 addition & 1 deletion website/docs/policies/explicit-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ spec:
Team: ($expectedTeam)
```
Finally, we can always access the current resource, policy and rule being evaluated using the builtin `$resource`, `$policy` and `$rule` bindings. No protection is made to prevent you from overriding those bindings though.
Finally, we can always access the current payload, policy and rule being evaluated using the builtin `$payload`, `$policy` and `$rule` bindings. No protection is made to prevent you from overriding those bindings though.

0 comments on commit 0d3458e

Please sign in to comment.