Skip to content

[Cedar Doc Issue] Add examples for passing actions as entities in the input hierarchy #80

@JoshuaWilkes

Description

@JoshuaWilkes

What were you trying to do?
I have tried to use this example for a cedar policy https://docs.cedarpolicy.com/policies/syntax-policy.html#term-parc-action

//matches any action in the hierarchy of the admin entity of type PhotoFlashRole
action in PhotoFlashRole::"admin"

When you write a policy like this you get an error like below:

expected an entity uid with the type `Action` but got `PhotoFlashRole::"admin"`. Action entities must have type `Action`

What is wrong and why?
I can find no other reference to being able to define actions as children of Entities so I believe that this is a mistake in the docs.

What do we need to do to fix this?
Edit: After some more testing, I think that the example needs to be changed to action in PhotoFlashRole::Action::"admin"

And a section should be added to the docs showing how you can supply actions as entities to create the hierarchy for policy evaluation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions