Skip to content

[BUG] Playground won't accept rules inside an entityΒ #2742

@mezakos

Description

@mezakos

Describe the bug
In Playground I get an error: "expected token to be relation, permission, attribute, got rule instead" when I try to create a rule inside an entity.

To Reproduce
Create a rule inside an entity

entity user {
    attribute age integer

    rule check_age(age integer){
        age >= 18
    }

    permission buy_beer = check_age(age)
}

Expected behavior
Accept the schema as valid. In the Permify docs, in the healthcare example there is a rule inside an entity, so I'm assuming it should be valid.
https://docs.permify.co/getting-started/examples/healthcare

Environment (please complete the following information, because it helps us investigate better):

  • Permify Playground

Metadata

Metadata

Labels

bugSometing isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions