I want users to have specific permissions for documents in a collection: All users should be able to read documents. The document owner should be able to create, update, and delete their own documents.
I've tried setting up the permissions using the format like in the screenshot, but I think this is not the right format. Can anybody give me a right example?
$permissions = [
Permission.read(Role.any()), // Anyone can read
Permission.delete(Role.user($payload['owner'])), // Owner can delete
Permission.update(Role.user($payload['owner'])), // Owner can update
];