Complex permissions can be defined by the value of fields in the database.
Here are some examples of advanced permissions scenarios:
- Accounts table with the customer type field. We can define that only a certain roles will see VIP customers.
- orders table - each salesperson can only view and update his own orders.
- Documents table - all users have permission to view documents, but all users can only update the documents that they. have created.
Setting up advanced permissions:
In the table where we want to set permissions, go to the permissions tab. Clicking on the appropriate role on an advanced options icon.
In the next step, a new rule with appropriate criteria must be added. For example:
Role admin will have permission to find and get all orders whose sum is greater than 1000.
Here we give find and get permissions only to the records that the user created.
click here to learn how to create an online database