Replies: 1 comment 8 replies
-
Very often all tenant based application have tenant id over all tenant specific entities. For example, in your case very likely that Issue has relation to organization and basically has If so, then your permissions are translated to this:
pseudocode above to show the idea of how it should be done in casl (user.ownedOrgIds is an array of all owned organizations ids by authenticated user) |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm exploring CASL as part of a migration from Oso and encountered a challenge regarding relational (or hierarchical) policies. Specifically, I'm looking for a way to express policies where permissions on one subject imply permissions on a related subject.
For example, consider this use case:
create
on anOrganization
subject, they should also be able tocreate
on anIssue
subject related to that organization.In Oso, this can be defined like this:
[Oso documentation on relationship-based access control](https://www.osohq.com/docs/modeling-in-polar/relationship-based-access-control-rebac/ownership#implement-the-logic)
However, IIUC, CASL does not natively support relational policies like the following pseudo-code:
Questions
I'd love to hear your thoughts on how best to approach this with CASL or whether this is something that could be added as a feature.
Thank you for your input!
Beta Was this translation helpful? Give feedback.
All reactions