I would in my table create a security filter by useremail but that this rule will not applied to the admins.
how could i proceed with the expression?
Solved! Go to Solution.
It works, there is no doubt about that 🙂
The best option for you is to have a real user available (could be you if you have two emails?) for testing this specifically.
Hi @Espegg
Please try the following:
OR(
USEREMAIL()=[email],
USERROLE()="Admin"
)
Alternatively, if you plan to manage your users through a table:
OR(
USEREMAIL()=[email],
LOOKUP(USEREMAIL(),"USER","email","role")="Administrator"
)
For reference:
Limit users to their own data - AppSheet Help
Hi @Aurelien
i have tried with
OR( USEREMAIL()=[email], USERROLE()="Admin" )
but the users see all the records...
Why?
Hi @Espegg
In the security filter? that should not happen, unless the user tested actually is an "admin".
Please note the preview pane always consider you an admin, no matter the email you enter in it.
Can you check and provide a screenshot of your table columns and the security filter expression you entered? Thanks
Here's the answer 🙂
@Aurelien wrote:
Please note the preview pane always consider you an admin, no matter the email you enter in it.
From the editor's preview pane, USERROLE() always renders TRUE 🙂
Ok, so there is not a way to test if it works for the normal users?
It works, there is no doubt about that 🙂
The best option for you is to have a real user available (could be you if you have two emails?) for testing this specifically.
ok, thanks!
You are welcome 🙂
User | Count |
---|---|
42 | |
33 | |
24 | |
23 | |
14 |