I have a requirement to restrict access to Dataverse records based on the field values in the records. Could someone advise the best approach for this?
The use case scenario is that I have a table of participants for an event, managed by a school/college. This table stores the personal details of people, including a date of birth.
To comply with data protection and safeguarding rules, the requirement is that only teachers/employees with correct vetting should be able to access records in the table that pertain to people that are less than 18 years of age. All app users in the organisation must be able to access records in the table that relate to adults who are 18 years or older.
My initial thought is to set up a child business unit for app users with restricted access. The users with full access would belong to the parent business unit. Whenever an app user adds or edits a record, I would run a Power Automate flow to modify the owner of the record to an arbitrary user in the appropriate business unit. I would also run a daily flow to modify the owner of records where the participant reaches 18 years of age. Alternatively, I could apply the same methodology, but using a teams structure instead.
The thing that concerns me is the level of automation that this would involve. Am I completely missing an obvious or more easy approach to do this? Is there a way to do this without calling flows, or could someone suggest alternate strategies to fulfil this requirement? Many thanks!