Skip to content

Commit

Permalink
GITBOOK-3624: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
Svyatoslav Krivosheev authored and gitbook-bot committed Oct 3, 2024
1 parent 02ce201 commit f999a45
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,21 +227,20 @@ GET /Organization/org-c/fhir/Patient/pt-1

## Configuring AccessPolicies

To allow some user/client to interact with a organization-based resources, AccessPolicy should be configured to check organization id from the `https://aidbox.app/tenant-organization-id` extension of User/Client resource.

This example allows org-based user (created by `PUT /Organization/<org-id>/fhir/User`) to see patients that are also created by OrgBAC.

```
PUT /AccessPolicy/as-practitioner-allow-org-patients
PUT /AccessPolicy/as-user-allow-org-patients
description: A practitioner should be able to get every patient in their organization.
description: A user should be able to get every patient in their organization.
engine: matcho
matcho:
params:
resource/type: Patient
request-method: get
user:
roles:
$contains:
value: 'practitioner'
meta:
extension:
$contains:
Expand Down

0 comments on commit f999a45

Please sign in to comment.