Skip to content

Commit

Permalink
Swap parameter order in check_access method call
Browse files Browse the repository at this point in the history
The method call to check_access in main.rs has been updated. The order of parameters has been switched, with claims_result.unwrap() coming before locator.body.clone(). This provides a more logical order for processing input parameters.
  • Loading branch information
arkavo-com committed Jul 16, 2024
1 parent a42eae3 commit 7d939ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ async fn handle_rewrap(
// execute contract
let contract = contract_simple_abac::simple_abac::SimpleAbac::new();
if claims_result.is_ok() {
if !contract.check_access(locator.body.clone(), claims_result.unwrap()) {
if !contract.check_access(claims_result.unwrap(), locator.body.clone()) {
// binary response
let mut response_data = Vec::new();
response_data.push(MessageType::RewrappedKey as u8);
Expand Down

0 comments on commit 7d939ef

Please sign in to comment.