File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,10 @@ test("biscuit builder", function(t) {
38
38
builder . addFact ( fact `fact(${ userId } )` ) ;
39
39
builder . addRule ( rule `u($id) <- user($id, ${ userId } )` ) ;
40
40
builder . addCheck ( check `check if check(${ userId } )` ) ;
41
+ builder . setRootKeyId ( 1234 ) ;
41
42
t . equal (
42
43
builder . toString ( ) ,
43
- `// no root key id set
44
+ `// root key id: 1234
44
45
user("1234");
45
46
fact("1234");
46
47
u($id) <- user($id, "1234");
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ impl BiscuitBuilder {
36
36
self . 0 . merge ( other. 0 . clone ( ) )
37
37
}
38
38
39
+ /// Sets the root key id
40
+ #[ wasm_bindgen( js_name = setRootKeyId) ]
41
+ pub fn set_root_key_id ( & mut self , root_key_id : u32 ) {
42
+ self . 0 . set_root_key_id ( root_key_id)
43
+ }
44
+
39
45
/// Adds a Datalog fact
40
46
#[ wasm_bindgen( js_name = addFact) ]
41
47
pub fn add_fact ( & mut self , fact : & Fact ) -> Result < ( ) , JsValue > {
You can’t perform that action at this time.
0 commit comments