Hi! Is there a way to validate
# spicedb
c
Hi! Is there a way to validate permission references (relation_x->permission_y), when schema is uploaded to spicedb or with a tool ex. in a test. We had a case the other day, with a misspelling of the permission. We would like to be able catch those kinds of errors, as early as possible.
v
This is by design. A relation may have multiple types, so it makes it easier to use when one of the definitions has the permission and another does not. Something perhaps we could do is make sure that at least one of the types in the relation has the permission. FYI @Joey
j
this is what the assertions and validation blocks are designed to ensure; they should cover all your permissions (ideally)
c
Ahhh ok. So we can run the CLI command in our CI/CD pipeline, with the correct assertions to cover all our permission references
j
or if using GitHub CI
you can use the GitHub action
c
Thanks 🙂
10 Views