Is it possible to prevent the update/delete of a row in a table to a specific role depending on a value of the row?
This role should be able to query rows using select.
Example: Saying that we have an user bob and admin.
- flag = 0, bob should be able to update/delete the row
- flag = 1, bob can not update or delete the row, but bob can select the row
- flag = 0 or flag = 1, admin can update or delete the row, regardless of the value in flag
I checked RLS(Row Level Security) but I don't know how to do that.
Thank you