Row Owner / Security set up

Hello all!

I have an app that in essence does this

Sales person makes an order

then the sales manager should be able to see the order

and the supplier of the order should see the order

There are multiple sales people, one sales manager but multiple suppliers

how do i set up full security to ensure that

  1. a sales person only sees their own sales
  2. a manager sees all sales from all sales people
  3. the suppliers see orders from all sales people but only where they are the nominated supplier

I know this can be done with data filtering but ofcourse the user, if techy enough can inspect network traffic and pull out all records if they really wanted

Thanks!!

You will need 3 row owner columns in your Orders table. An email column that contains the email address of the sales person. Another that contains the sales manager email. And a third that contains the supplier email. That should be the easiest way to do it as long as each row owner represents one person. Otherwise you will need to start utilizing Role functionality if you want to grant access to single row for groups of multiple sales people, multiple managers, or multiple suppliers…but that doesn’t seem to be the case based on what you described.

1 Like

Thank you jeff.

I have actually just had a thought, the suppliers have multiple staff so it may be required where there are multiple suppliers.

how can imake this work with said role functionality?

You will need a Role column in your user table that is configured for user profile roles. You could fill it a supplier name or ID. Then in your orders table, that third column would contain the supplier name or ID instead of an email address.

Just note that things like Roles introduce some restrictions. For example, you cannot change a Role column value via the app. You can only change a role via the data editor, the API, or a server side workflow.

1 Like