I am trying to set up Roles in my Glide App to allow an Admin User access to an overview of all data relevant to their company, but it appears to not be working as expected.
I already have a pretty complex Row Owner structure in my app to protect user data (it is a marketplace application so some tables have upwards up 15 row owners since at lot of data is shared by a lot of different users). A builder user can submit a request in which multiple basic supplier users can bid on. The basic functionality and data protection can be obtained with just row owners, but I am now trying to add an Admin User that can access the data of all basic supplier users within their company.
I could use Row Owners again, and just create a Row Owner column to contain the admin email on every relevant table and row, but the problem with this is that there would be no (good) way for the admin user to change since I would need to update every table and every row with the new Admin email. So instead, I am (attempting) to use the unique ID of the Supply Company, since the ID will never change, as the User Role.
I have assigned the Company ID as the Role on the Layout Editor of the User Profile and added an Owner column (in my case called Supplier 1 A Role) to the table in which I hope to allow the Admin access to the data. However, when I make the Owner (Supplier 1 A Role) column a row owner, the data remains greyed out and correspondingly does not appear on the Admin User’s frontend.
Another interesting thing to note is that my Glide Usage Page shows “0/50” private users, while I have assigned two users to roles, as seen above in the “View as User” dropdown.
I have a good feeling that this is not a bug and rather a setup error on my end, but I have been playing around with a ton of things with no success. Any thoughts would be greatly appreciated since I can’t seem to figure it out on my own.
Just one thing - have you confirmed that this doesn’t work in the published App?
I do know that when you are using Roles as Row Owners, the behaviour in the builder can sometimes be a bit flakey when switching the “Viewing as…” user. Sometimes when you switch users, the row ownership will not be properly reflected, and you need to switch back and forth a few times before it updates.
I “Published Changes” and went to the live app and could see the data. I then went back to the database and the rows were no loner greyed out.
I now assume that this is a bug and that Roles only work once you “Publish changes” after adding User Roles? I hope the Glide team and other users are aware of this. It is not a non-starter bug but certainly is not the expected functionality and is annoying if you want to work on adding User Roles and editing the app thereafter without having to first publish changes to the live app.
Thanks again, not sure how long I would have spun around in circles trying to figure this out on my own.
No, I don’t think it’s a bug, but rather some browser specific behaviour. I was going to report it as a bug a while back, but then I found that I couldn’t reproduce the behaviour in the replay browser. For me, it happens most often when I’m using Chrome on MacOS.
It shouldn’t be necessary to publish your App to see the effect of the changes. Just try switching back and forth between “Viewing as…” users a few times. And if all else fails, reloading the builder should do the trick.
Actually i am having weird issues with roles and row owners now.
Issue on builder & app.
User should be a row owner but out of the 600 rows he can only access 20. This is for all users.
This is becoming an issue
I even created a column to check if the value of row owner is same to user role to confirm the 2 values were equal… and even when its True, user has no access to that row
Okay, that’s probably a clue.
Especially given that manually retyping the values “fixes” the problem.
Suggests that the CSV might contain additional unicode values that aren’t visible.
Perhaps try running your CSV through a validator such as csvlint.io to see if it picks anything up.
Thank you for the help, I just deleted them all manually then put the write row owner value in the data editor. This is just sample data, when I upload the real data will confirm this.