Each company separated in the database
Every table that holds a company’s records has row-level security switched on and enforced. The database itself works out which company, branch and person is asking, and returns only their rows.
- Who is asking is set only after the sign-in is checked; a screen or a request can’t choose it.
- The application connects to the database without the right to bypass row-level security.
- Branch, company and role boundaries are tested automatically on every change.