Skip to content

Conversation

@john-h-kastner-aws
Copy link
Contributor

Fix #563

action == ?action previously stated that it expected single entity uid or set of entity uids, but this is incorrect for ==.

Fixed by first checking if the operator in the scope constraint is == or in, and only calling to_refs_to_ref for the in case. The == case calls to_ref which will correctly report that the RHS of the equality can only be a single entity and not a set of entities.

This shouldn't be a breaking change even though I deleted a variant of ToASTErrorKind. That error enum is not exported from cedar-policy.

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A bug fix or other functionality change requiring a patch to cedar-policy.
    I confirm that this PR (choose one, and delete the other options):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

Signed-off-by: John Kastner <[email protected]>
Signed-off-by: John Kastner <[email protected]>
@john-h-kastner-aws john-h-kastner-aws merged commit 489af84 into main Apr 25, 2024
@cdisselkoen cdisselkoen deleted the better_action_err branch April 25, 2024 18:18
john-h-kastner-aws added a commit that referenced this pull request May 6, 2024
john-h-kastner-aws added a commit that referenced this pull request May 7, 2024
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.

Misleading messages for errors on == in action scope

3 participants