Can I change the owner ID of a data object? I am writing migration code, and I want to replicate the same permissions (based on ownership) as the old data.
If not, my idea is to use server-side code to set the correct permissions. The data objects contain properties that link to the users that have to have permissions (there is an operator which should have read/write access and a patient which should have read-only access). Would that be a good way to handle this? I don’t like having to handle permissions on the client.
“…Can I change the owner ID of a data object”
You can change ownerId value using data service api methods:
(if current user of client app has permission for this operation).
Yes, I plan to do this with a separate user with special permissions for the migration process.