Skip to content

Commit 50f3c8b

Browse files
authored
Merge pull request #289 from eclipse-biscuit/fix-closures-sample
fix: don’t rely on lists in closures sample
2 parents 0d4fbef + d2fb5ce commit 50f3c8b

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

biscuit-auth/examples/testcases.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2206,7 +2206,7 @@ fn closures(target: &str, root: &KeyPair, test: bool) -> TestResult {
22062206
validate_token(
22072207
root,
22082208
&data[..],
2209-
"allow if [true].any($p -> [true].all($p -> $p))",
2209+
r#"allow if { "true" }.any($p -> { "true" }.all($p -> $p))"#,
22102210
),
22112211
);
22122212

biscuit-auth/samples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,7 +3054,7 @@ result: `Ok(0)`
30543054

30553055
authorizer code:
30563056
```
3057-
allow if [true].any($p -> [true].all($p -> $p));
3057+
allow if {"true"}.any($p -> {"true"}.all($p -> $p));
30583058
```
30593059

30603060
revocation ids:
@@ -3085,7 +3085,7 @@ World {
30853085
},
30863086
]
30873087
policies: [
3088-
"allow if [true].any($p -> [true].all($p -> $p))",
3088+
"allow if {\"true\"}.any($p -> {\"true\"}.all($p -> $p))",
30893089
]
30903090
}
30913091
```

biscuit-auth/samples/samples.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2850,15 +2850,15 @@
28502850
}
28512851
],
28522852
"policies": [
2853-
"allow if [true].any($p -> [true].all($p -> $p))"
2853+
"allow if {\"true\"}.any($p -> {\"true\"}.all($p -> $p))"
28542854
]
28552855
},
28562856
"result": {
28572857
"Err": {
28582858
"Execution": "ShadowedVariable"
28592859
}
28602860
},
2861-
"authorizer_code": "allow if [true].any($p -> [true].all($p -> $p));\n",
2861+
"authorizer_code": "allow if {\"true\"}.any($p -> {\"true\"}.all($p -> $p));\n",
28622862
"revocation_ids": [
28632863
"2cd348b6df5f08b900903fd8d3fbea0bb89b665c331a2aa2131e0b8ecb38b3550275d4ccd8db35da6c4433eed1d456cfb761e3fcc7845894d891e986ca044b02"
28642864
]

0 commit comments

Comments
 (0)