Skip to content

Commit

Permalink
fix: use Authorizer::to_string for inspection
Browse files Browse the repository at this point in the history
`to_string` provides a more complete view than `dump_code`, including facts origins.

Before biscuit-auth/biscuit-rust#195, `to_string()` did not include authorizer facts on snapshots  (before running `authorize`). This is not an issue with the latest biscuit-rust version (`4.1.1`), so it is safe to use `to_string()`
  • Loading branch information
divarvel committed Feb 26, 2024
1 parent bef0a33 commit b8a58bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ pub fn handle_inspect_snapshot_inner(

let mut authorizer = read_snapshot_from(&snapshot_from)?;
let snapshot_description = SnapshotDescription {
code: authorizer.dump_code(),
code: authorizer.to_string(),
iterations: authorizer.iterations(),
elapsed_micros: authorizer.execution_time().as_micros(),
};
Expand Down

0 comments on commit b8a58bd

Please sign in to comment.