Skip to content

Commit

Permalink
actually run auth
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Wells <[email protected]>
  • Loading branch information
andrewmwells-amazon committed Mar 6, 2024
1 parent 4c42ca6 commit 908b779
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions cedar-drt/src/lean_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,23 +321,7 @@ impl CedarTestImplementation for LeanDefinitionalEngine {
policies: &ast::PolicySet,
entities: &Entities,
) -> TestResult<TestResponse> {
// self.is_authorized(request, policies, entities)
let response = cedar_policy::Response::new(Decision::Allow, HashSet::new(), Vec::new());
// let response = cedar_policy::Response::from(response);
let response = InterfaceResponse::new(
response.decision(),
response.diagnostics().reason().cloned().collect(),
response
.diagnostics()
.errors()
.map(cedar_policy::AuthorizationError::id)
.map(ToString::to_string)
.collect(),
);
TestResult::Success(TestResponse {
response,
timing_info: HashMap::new(),
})
self.is_authorized(request, policies, entities)
}

fn interpret(
Expand Down

0 comments on commit 908b779

Please sign in to comment.