Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add authorization example to ro cedar rust hello world #202

Open
wants to merge 1 commit into
base: release/4.2.x
Choose a base branch
from

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

Signed-off-by: Victor Moreno <morevct@amazon.com>
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