I hadn’t edited any apps in the last few weeks and in that time, the “Preview As” feature has been introduced.
How exactly is this supposed to function? It seems I incorrectly assumed, it would show the app editor a preview of the app as the user who’s email address is entered, essentially applying any filter where USEREMAIL() is used. I also assumed that this would pick up the ‘Preview As’ user’s USERROLE also.
Many of the filter or security expressions I use with our apps will include both USEREMAIL as well as USERROLE, i.e. prevent the user from using this function or seeing this data unless their USEREMAIL()=email@example.com or their USERROLE=Admin.
Anywhere the USERROLE=Admin is used, the app recognizes me as the admin and shows all the functions that should be hidden from the user I am previewing the app as. I would like to suggest that the “Preview As” feature also look at the USERROLE in addition to USEREMAIL of the user that is being previewed.