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
vroldanbet
03/11/2024, 2:59 PM
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
Joey
03/11/2024, 3:12 PM
this is what the assertions and validation blocks are designed to ensure; they should cover all your permissions (ideally)
c
CasperT
03/11/2024, 9:08 PM
Ahhh ok. So we can run the CLI command in our CI/CD pipeline, with the correct assertions to cover all our permission references