Controlling permission levels with expressions
Regardless of the purpose of your business app, it is quite a common requirement to allocate different permission levels to every user one by one. For instance, say you are developing an app that all employees of the company will use, but you wish to control the editing permissions, in terms of who can edit what data. You might wish to let each user only edit the data associated with them, or grant full permission to admins to edit data. It purely depends on how you would like to control those permission levels.
AppSheet provides different approaches to achieving this goal, but let’s review the basic approach, using what we have learned in this book so far.
Using the userrole() expression to control permissions
Let’s assume the possible use case we discussed earlier. As we learned, an app role is assigned to each added user. AppSheet provides the userrole()
expression to capture the value of this setting when the...