I would like to restrict user rights so that a regular user can read / write their own user document.
I was able to set write permissions so that the user can edit his own document (via the validate_doc_update function in the project document).
Now I only need to restrict the user to viewing the list of users or other user documents. If I set the database permissions for the "_admin" role, the user will not be able to view his own document, which I do not intend to.
Can this be done in a more general way? That is, set read permissions so that the user can read only certain documents in the database?
source share