Workaround to permission a “switch” component?

Building an app for a group who, under normal circumstances, derives 80% of its revenue from wholesale sales to restos and now-collapsing foreign export markets. A barebones infrastructure for DTC distro, the app will be a template for their individual operations.

Want to give producers (not customers who use the app) the ability to toggle “In stock” / “Out of Stock” via a Switch component not a manual update in the sheet, while they’re out in the field. With permissions, is there a workaround other than creating TWO apps for the same sheet? Need to keep UX super simple and avoid the chance of major errors.

Appreciate any tips!

Read this. Basically you will need to create a relation from your items to an admin sheet using a Relation and Lookup to get a list of emails that have access to the switch. Then set visibility to only show when the signed in user is in the lookup.

Thanks @Jeff_Hager. This would work if I were to remain in control of the app but I’m allowing others (some of whom not at all tech-savvy) to copy and use on their own. Thus, the need to simplicity.

It’s actually super simple and the structure would remain the same if the app was copied. Only different user emails would be entered. The use of an admin or permission sheet would be needed no matter what. How would you plan to define user roles?

I’m sure I have several posts like this, but here is a basic step by step.

Re: user roles, to answer your question:

I’m setting up the app for a 1-admin use case but there will be varying needs. I have permissions set to public for a couple of reasons. Primarily simplicity, but also:

  • Want to make sure providers can preview all features from a share link without sign-in requirement.
  • Reduced purchase friction for customers ready to place an order via form (no shopping cart).

The only feature that necessitates per-user data is favoriting an item.

Regarding the proposed solution - Admin still has to add their email for Admin Rights in a tab’s visibility settings, no?

Going through more write-ups.

OK, you didn’t mention that the app would be public. Some sort of sign in is required for the app to know who the user is. How would you determine if a user is a provider or an admin and not a customer?

At this time, Glide disables per user filtering and visibility if you are not using ‘Public with Email’ or Whitelist.

Yes, with my solution, you would need a sheet with a list of emails.

Thanks for your help @Jeff_Hager! More advanced permissions will be useful to providers who want to level up basic version of the app. As is, it’s not necessary to benefit from basic features.