Roles, Admin, Users

Hi,
my Glide app is a driving working order app for tourism industry.
So, my tables in Airtable are vehicles, drivers, clients, work orders, reports.
I want each driver to see only his own Work orders, and Admin to see all Work orders.
If I filter “Name Surname from table Drivers IS User Name”, each driver gets his own work orders
GlideFilter200223

This is what I want for each driver, but Admin cannot see any work order


My Users table:

Glide is a fantastic tool and I am going to make 3-4 more apps :slight_smile:
Thank you very much all

In your last screenshot, I see a column named “Uloga” - is that the column that is set as the Role in your User Profiles configuration?

If yes, then I would suggest the following:

  • Remove Row Owners from that column (it isn’t required)
  • Create another text column and name it something like “Admin Owner”. Make that column a Row Owner, and add the word “Admin” in every row.

That should solve your problem.

1 Like

Thank you for quick answer…
But still Admin can’t see all Work Orders…

My Users table (yes, Uloga is Role)

Drivers table

Work Orders table

Work Order Collection viewed as user (driver) Goran Ivanisevic,
when filtered “Name Surname from Drivers is Username”

Maybe somehow to “link” Admin Role to Work Order table?
Because when I filter data, I can filter only by Work Orders columns,
and there is no link between Work Orders table and Admin Role.
In Airtable there is no link between Users and Drivers,
maybe that is the problem??

Sorry for this long post, I don’t see a solution, and I am very confused…

Please show me your User Profiles configuration.

Go to Settings → Users & Authentication → Edit user profile

Here it is:

But when I originally signed in Glide, I did with this user:

Currently I am on Legacy Starter plan

Thank you very much for your help

Do you have any Row Owner columns in your Driver and Work Order tables?

No,
I have no Row Owner columns in Driver table or in Work Orders table.
Drivers table


Work Orders table


Ideally you would not use filters and instead have two Row Owner columns in each of those tables. One column would contain the email address of the driver, and the other would contain the the word ‘Admin’ to match your admin role. That would grant each driver access to only their own rows and the admin access to all rows.

Row owners are more secure than filters, but if you prefer to use filters instead of row owners, then you need a template column to place the word ‘Admin’ on all rows, and then add an additional filter that checks if that template column matches the role value in the user profile.

2 Likes

Thank you very much

I managed to get each Driver to see their own Work Order,
and Admin to see all Work Orders
I did it by adding If =) Then=) Else column in Work Orders table

I learned some important things for developing future Glide apps.
If you have Airtable base, a new column in Glide (user specific column, not from Airtable) cannot be Row Owner column.
When creating Airtable base, it is very important to link tables on User =) Username email column.
Next time I will make Username email the primary field in Airtable User table :slight_smile:

You do understand that is not fully secure, yes?

Yes, a User Specific column cannot be a row owner.
However, if you created those columns in Airtable instead of Glide as simple text columns, then let them sync to Glide, Glide would then allow you to use them as Row Owners.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.