Eden_Webb
(Eden Webb)
July 18, 2021, 10:06pm
1
Hi all,
I am stuck with the template rule where users can read and write their own data. I have used the Realm UI to deploy this rule
{
"user_id": "%%user.id"
}
But I am getting back the error
insert not permitted (status 403)
Is this correct? Where else should I look to fix because I am stumped by this
Have you set the flag to indicate that the owner is allowed to insert?
Does the document you’re trying to insert include a field named user_id
?
Eden_Webb
(Eden Webb)
July 22, 2021, 3:16pm
3
Thanks Andrew for your reply. What I was trying to achieve was something like the below;
It appears the rules do not work with multiple conditions. Is the syntax below correct. Say:
{
"agency": "%%user.custom_data.agency",
"%%user.custom_data.isAdmin": true
}