Skip to content

Conversation

Swolebrain
Copy link
Contributor

Issue #, if available:
n/a

Description of changes:
just adds an example of using is_authorized to the cedar rust simple examples

Copy link
Contributor

@john-h-kastner-aws john-h-kastner-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though I'm not sure about the CI failures. The oopsla2024 build looks like it's failing for unrelated reasons. Does this build against main? (We should probably add the example for both 4.2 and main branches anyways)

Comment on lines +483 to +484
let context_json_val = serde_json::json!({});
let context = Context::from_json_value(context_json_val, None).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicer API for this:

Suggested change
let context_json_val = serde_json::json!({});
let context = Context::from_json_value(context_json_val, None).unwrap();
let context = Context::empty();

Comment on lines +500 to +501
let entities_json = r#"[]"#;
let entities = Entities::from_json_str(entities_json, None).expect("entity parse error");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let entities_json = r#"[]"#;
let entities = Entities::from_json_str(entities_json, None).expect("entity parse error");
let entities = Entities::empty();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants