I feel like this should be fairly simple, but am struggling a little. Have watched @Robert_Petitto excellent videos - but am still not there.
I want to create a website which allows access for my clients to projects they are working on. Table structure would be something like this -
Users (with name, client etc)
Clients table (linked back to each user)
Projects table (linked back to the client)
Then there would be 2 or 3 tables of various information pertaining to each project. ie Schedules, Issue tracker, To do list etc.
I want User 1 (for example), who works for Client 1 (there will be several users working for one client) - to only be able to access Projects that are linked to that client (again - there will be several projects for each client)
I went down trying to user Row Owners - but can’t get there. I’ve had it so that each user can only see their own projects in the projects table, but only if I manually type in the users “Role” - as of course I can’t make a lookup field (lookup from the client that is linked on each project) a row owner.
Suspect I have gone down the wrong route with row owners (only messing about at the moment so it doesn’t matter). Would you agree? Should I just use filters? None of the data in the Schedules, Issue tracker etc tables is confidential or sensitive - but there could be a lot of it.
Using filters would be an easy out if you’re not too fussed about data security. But if there will be lots of data then yeah, performance could become an issue. If you have access to Big Tables, then that could be an option.
However, it should be pretty straight forward to get what you want by leveraging Roles as Row Owners. Essentially what you could do is use the ClientID as a Role name. Every user that works for Client X would be given the ClientID value of Client X as a Role. Then in your Projects table include a ClientID column, and apply Row Owners to that column. The end result should be that any user that works for Client X should have access to all of that Clients projects, and no others.
Where the above could break down is if you have users that work for more than one Client. If that was the case, you’d need a non-computed array column as your User Profile->Role column. And the only way to get that would be to attach a Google Sheet.
I got row owners working nicely - except for (as you expected!) when one user needs access to all roles. in my case that’s me as the Admin.
I have my user table to Airtable. Users table has a link to the clients table. I added another column called “Clients for Glide” - with a formula simply replicating the text in the linked field (a native linked field in Airtable couldn’t be used as a Row Owner - so this was a workaround) - then set row owners on that field. Same in any other tables - such as projects. Then in user settings - I made sure the Role option was set to “Clients for Glide”
That works just fine - but not if there is more than one value in the Clients for Glide field - they don’t get picked up individually. (I would have just added all clients to my Admin user)
You could get around this by giving yourself the Admin role, and then add a second Row Owner column to all data tables that just contains the word “Admin”.
I was slightly thrown - as a column I made in Glide called “Admin role” - which I would populate with the text “admin” couldn’t be made as row owners. But adding a column in Airtable - with the formula “Admin” - so every row gets “Admin” - worked!
I’m not an Airtable user, but from what I’ve seen here in the Community I believe that if you create a non-computed column in a Glide table that’s connected to an Airtable data source, then Glide automatically makes it a User Specific column. Which would explain why you wouldn’t be able to make it a Row Owner column. I’m not sure why Glide behaves that way, but I’d guess it’s due to a limitation with the Airtable integration