With Permify schema language, you can define recursive relationship-based permissions within the same entity. As an example, consider a system where there are multiple organizations within a company, some of which may have a parent-child relationship between them. As expected, organization members are also granted permission to view their organization details. You can model that as follows:Documentation Index
Fetch the complete documentation index at: https://proxy-docs.permify.co/llms.txt
Use this file to discover all available pages before exploring further.
First authorization schema that we provide won’t solve this issue because parent.member accommodate single upward traversal in a hierarchy.
Instead of parent.member we can call the parent view permission on the same entity - parent.view to achieve multiple levels of upward traversal, as follows:
Credits to Léo for the illustration and for
highlighting this use case.