Permission of action(s) in slice of data

Hi team,

I would like to control user permission of my data in slice to only add, but cannot be deleted from my users. I can add action but cannot find where or how to limit to only add.
I would like admin role to be able to delete while user role only view and add.

Many thanks

Solved Solved
1 5 194
1 ACCEPTED SOLUTION

For table level permissions, please take a look at the article

Control add, update, and delete operations - AppSheet Help

At slice level delete you could control through action 's following setting by using same expression as slice filter and by adding user email based  expression to the over all expression, something like 

AND( [Order Status]= "Complete",

           ANY(SELECT(Users[Role],[Email]=USEREMAIL()))="Admin"

           )

Where Users table is a table with a single row per user with user roles defined in the table.

Suvrutt_Gurjar_0-1690194808636.png

Also for managing user roles in a better way, please take a look at the following landmark tip by @MultiTech 

Current User (Slice) | How to conform your app a... - Google Cloud Community

 

 

 

 

 

View solution in original post

5 REPLIES 5

For table level permissions, please take a look at the article

Control add, update, and delete operations - AppSheet Help

At slice level delete you could control through action 's following setting by using same expression as slice filter and by adding user email based  expression to the over all expression, something like 

AND( [Order Status]= "Complete",

           ANY(SELECT(Users[Role],[Email]=USEREMAIL()))="Admin"

           )

Where Users table is a table with a single row per user with user roles defined in the table.

Suvrutt_Gurjar_0-1690194808636.png

Also for managing user roles in a better way, please take a look at the following landmark tip by @MultiTech 

Current User (Slice) | How to conform your app a... - Google Cloud Community

 

 

 

 

 

Schaue hier das beste Erklรคrvideo zum Thema: Zeigen Sie einem Benutzer nur seine Daten an  

@Suvrutt_Gurjar has the right idea, though I wouldn't use the SELECT() in there. ๐Ÿคช๐Ÿ˜„  (Also, thanks for the kind mention Suvrutt!)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I would for sure implement the Current User system in your app, it will make a ton of advanced functionality in your app more feasible in the future.

Here's a couple examples of how the Current User system can help in the future:

Hi @MultiTech ,

You are most welcome. 

On using SELECT(), yes of course, given a chance, one will use superior solution and that is why also referred your tip rather than winding up the post after suggesting a SELECT()๐Ÿ™‚ We have so many warns on "brute force" approach (using SELECTS()  and multirow expressions) after all in the community over the years.

In general my approach is to respond based on a community member's question and member's ( of course anticipated) awareness of the platform and member's tenure in the community. My thought is rather than overwhelming, it may be good at times to suggest a simpler approach to start with along with a better one. With time, the app creator will automatically go for  a better solution.

 

Thank you for all the expert advice.
I would like to Accept as Solution for everyone.

@MultiTechhas the best scale up solution.
@Suvrutt_Gurjarhas the simplest solution for my solution.
@Tommy62has the related video for my case.

Top Labels in this Space