great-crayon-86888
11/04/2023, 2:50 PMchilly-king-10285
11/04/2023, 2:50 PMchilly-king-10285
11/04/2023, 2:51 PMAppointment
, Patients
, Billing
, Claims
, etc. 2. Make a list of relationships each object has to other objects. In a database, those would be associations expressed with foreign keys. 3. Define each relation in the OPL. 4. Make a list of permissions that you want to check. These are the permissions you've listed. 5. Define each permission in the OPL. 6. Test your permission model. For example, if you have a user Bob
who is an admin
and you want to check if Bob
has the permission to Create appointment
, you would ask Ory Permissions: is User:Bob allowed to create on Appointment:X
. The system checks how Bob could have the create
permission, and then checks if Bob is an admin. Remember, designing a permission model is a complex task. Ory Permissions and the OPL, as a subset of TypeScript, provide a streamlined approach to permissions with the benefit of being processed by a fast, global permission engine. For more details, you can refer to the [Ory Permission Language specification](https://www.ory.sh/docs/keto/reference/ory-permission-language) and the guide on [how to create a permission model](https://www.ory.sh/docs/keto/modeling/create-permission-model).