relationships in validations as string instead of list has questionable ergonomics
#2536
Closed
hermannloose
started this conversation in
General
Replies: 1 comment 1 reply
|
See #1437 for the current proposal on how to address this issue; changing the YAML format would be non-trivial due to its wide use in various tools |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We really like the ability to "unit-test" more complex permissioning schemes with validation files, but the fact that
relationshipsis a string instead of a list makes it unnecessarily cumbersome to document the interesting bits for a particular scenario, as the whole set of relationships tends to contain a lot of boilerplate as well, to create users, roles, policies etc. Ifrelationshipswas a list, it would be easy to break it up into logical groups with comments, as well as explain the "why" for any non-obvious parts, e.g. "we are sharing this with a user outside the org, which should never happen through app logic, but in case a relation like this ever appears, the&operation infoo->viewprotects against it" etc.Making it a list could also open up avenues for reusing relationships from other files, similar to how
schemaFile: schema.zedavoids having to repeat the schema everywhere. Think for example:The complexity of this shouldn't snowball of course, but some support for composing lists would really help with keeping test relationships realistic yet their size in a particular validation file manageable.
All reactions