@Deena and @ThinhDinh thanks for your input. I have been thinking more about this and I still donāt fully understand your suggestion if Iām honest.
My current belief is that the ONLY thing we can be sure of is that Glide will return only rows where the current logged-in user is a row owner. This is not an āapp visibilityā trick because the non-matching rows are not āhiddenā - they are not even returned to the app.
In the case of visibility, however, data is returned, but the app uses logic to hide that data. Itās actually there, in the app, but hidden, so we can change our logic to show it based on certain conditions if we wish.
The second scenario is not secure since it is possible, using the browser inspect element function for example, to view this data and even to CHANGE it app-side. This means that one could change the value of, say, the Admin flag in a returned row from the User Profile sheet. Then the various visibility rules that depend on the flag would trigger.
So returning to my scenario, there is a sheet that holds, say, a row for each item that the restaurant sells with a name, description, photo and price. Public users and customers (who will have user profiles) should be able to see this entire sheet freely BUT not edit it. One or more members of staff (who also have user profiles) should be able to edit this entire sheet. It SHOULD be possible to do this in a single app.
@David has proposed using sheet mirroring and I get that bit. The āmasterā sheet can be made available for staff to edit and we can use a Google sheet formula (not yet tried this) to duplicate the entire sheet into a āslaveā copy which everybody can read. So far so good.
However the only way to restrict access to the āmasterā, without relying on visibility, is to use row owners. I know that we can assign a single row owner to a row or multiple row owners by using an array column. However I do not know in advance how many row owners are required and who they are. These are essentially the staff and will be configured by the restaurant from the app UI. We have to do it this way because Glide does not yet support built-in ārolesā.
So the question remains, how do I allow the end user, via the same app, to manage the staff users who have the ability to update the āmasterā sheet in a secure manner? If I do this based on any flag in the user profile row then I imagine it can be easily circumvented?
Or am I totally missing the point somewhere!
Thanks in advance for any guidance.