How to limit access to data?

Hello!

I would like to make a restaurant listing app. I am interested in how to make a database so that each restaurant can edit its own data and does not have access to the data of other restaurants.

Thank you!

row owner, role, or filters

How do I determine who is the row owner?

by user email address

1 Like

OK, thanks! I will try, should the database be made in glide or in google sheets?

always go with google sheets… the most reliable service in the World… plus you can do real magic with sheets formulas and scripts.

Can you please describe to me how to make each restaurant see only its data? Then the restaurant enters the data in the app or in a Google Sheet?

assign the owner’s email to each restaurant… but there is a bad side to this method… that’s why I’m not a big fan of the row owner function… it blocks the whole row. So you gonna have to recreate accessible info in some other sheet.

Which method do you recommend? And how do I do that?

hmm… I have a very unique and complicated method… LOL

It looks complicated :slight_smile:

1 Like

don’t worry… in a few minutes… (or more) some of the big writers, will write a whole manual on how to make your question work using just Glide… i’m out for today :wink:

Thanks!

If you need this to be secure, then you would need to make use of the roles feature.
Essentially you would define a role for each restaurant, assign the appropriate role to each user from each restaurant, and then use those roles as row owners.

For example, imagine that you have Restaurant A and Restaurant B. You might define something like role resta for Restaurant A and restb for Restaurant B. All users that belong to Restaurant A would be given the resta role, and all users from Restaurant B would get restb.

Then in the table/s that contain the Restaurant data, you would have a row owner column. Data that belongs to Restaurant A would have resta in the row owner column, and data that belongs to Restaurant B would have restb.

Using this approach, the data for each restaurant would be siloed, and it would not be possible for users from one restaurant to access data from any other restaurant.

It should be noted however, that every user that is assigned a role would be counted as a private user, even if your App allows anyone to sign in.

2 Likes

Thank’s!