I am new to parse and wanting to give parse server a try. I have been reading the documentation and tutorials but I am not able to understand the Roles and Permissions part clearly.
So, basically when a backend is developed from scratch, it typically has Users, Roles and Permissions which is similar to what parse also provides for data classes. But there are cases where sometimes features and functionality are also put behind permissions. For example, a simple permission ALLOW_PRODUCT_EXPORT when given to a Role, will show an “Export to CSV” button on the UI for all the users who are part of that role.
In parse server terminology “Export to CSV” would have to be a data class so that a read role can be assigned to it, but it does not make sense that way.
So, how can the above custom permissions functionality be handled in parse server?
I was also not able to figure out how to bring the permissions of data classes a user has on to the UI so that features on the UI can be managed accordingly.
The aim being to allow the user to show edit UI or show read only mode UI for some data.
For example, I have a list of products in tabular format on my UI, the UI component is the same across all users. If a user with role “Store_Keeper” views that page, I should be able to show him an “Edit” button based on his role ACL(read and edit) but if a user with “Sales” views the same page, he should not be able to see the “Edit” button on his screen based on his role ACL(edit).
So, basically in terms of managing the UI, how can I get the info from parse server to the UI to see if the currently logged in user is allowed to edit the data he is currently viewing?
Appreciate your help! thanks.