Im doing a sleep diary. I have a table for the sleep diary with privacy rules, a table for the practitioner without and a table for linking the practitioner with the patient with privacy rules.
What I want to do is have a rule that allows access for the practitioner the patient has chosen to share data with but if I try and do it it only allows me to work within the table the rules are on. So I cant search for the selected practitioner. Other than creating constraints and not using privacy rules is there a way to make this happen?
I also wanted to implement privacy rules based on a record in a linked object (e.g. sleep diary has a practitioner which has a user → when this condition is met, the user in practitioner can see it).
This unfortunately is - to the best of my understanding - not possible. You need to either link a rule to the ‘Thing’ field entries themself (e.g. Sleep Diary’s visible
is yes → visible to everyone logged in) or a rule that links to a user field entry (e.g. Current User’s sleep diary contains This sleep diary)
I did it so that each Thing that has privacy rules applied has a fields for privacy rules (e.g. privacy_internal: list of user → Rule applies if this list contains current user)
If I could start over again I would probably try another tool to build a multi tenant application
really unsatisfactory!
the database & workflows get messy fast
Ensure that:
- Your User type includes a field that references a Practionter thing for users who are practitioners
- Your Patient type includes a field that references a list of Practioners authorized to access the patient’s data
Create privacy rule along the lines ofThis Patient's Authorized_Practioners contains Current User's Practioner
.
Cheers, Ill see how that goes. Thanks heaps.
This topic was automatically closed after 70 days. New replies are no longer allowed.