Hi all, my question re AppSheet is, can each user I have in my DB only see information related to them and not the entire database?
@Aleksi_Alkio hi aleksi, sorry to bother again, im not following the security filters code, I have data from two different email users in the googlesheet. i would like only user firstname.lastname@example.org to see email@example.com rows of data. Can you assist with the correct code protocol please?
Thanks Bellave. Could you briefly explain how that works? Is it basically restricting access based in their email address?
Aleksi, i’ve also tried to make one user or email account the admin, hence they can see and do everything. When i log in with this account i can only see the the data for the corresponding admin email (per the security expression) How can i allow this person to see everything? The 1=1 expression sorry again doesnt make sense to me.
Currently i have this which fetches user data matching the login email which is great [Email]=USEREMAIL()
How would i allow one or two emails to access everything?
if i may, i’ve done this in my tables - I create a user table which contains email, first & last name and company grade (Admin, Team Member, restricted)
I’ve then created a slice and a new UX view which filters for email=useremail() for any data I want people to only view their own data In the showif component of the views for the everything view i would put: in(“Admin”,Select(Users[Grade],[email]=Useremail()))
For the people who are restricted to only their entries - in the UX for that slice: in(“Restricted”,Select(Users[Grade],[email]=Useremail()))
PS: if you have related views, create new virtual columns in the main one and link it to the slice which will give you your related view tables with only their own data
Another approach… if you have only one admin user, you could write the formula like OR([Email]=USEREMAIL(),USEREMAIL()=“firstname.lastname@example.org”)
Thanks everyone, I’m very new to all this, appreciate the feedback
Yes, you would have all data in each sheet filtered out based on the user’s email which they will need to use to authenticate. You, as the app creator get to maintain access to the app by adding the emails to the white list which is set in the Users tab of the App Editor.
Thanks Bellave, is there a video tutorial on this anywhere that you know of?
These two articles may help you either…
You probably have a column [Email] in your table. You can then add a formula like [Email]=USEREMAIL() and that will take care of it. It means… you only need to write a formula where the result is either TRUE or FALSE. In this case when the user email@example.com is using the app, in his/her row the answer is TRUE and he/she will see it. If the user is somebody else, the answer is FALSE and he/she won’t see it.
So… you can write what ever expression you want. The result just need to be TRUE or FALSE. If you type 1=1, everybody can see that record. If you type [Date]=TODAY(), all users will see the record only today if [Date] is today.
thank you aleksi, i believe that has worked for me. i really appreciate your assistance