I added the following predicate, assuming it will allow only the logged in user to edit their document, without letting them edit the email address. But it doesn’t work (getting permission denied)
{
resource: Collection("User"),
actions: {
read: true,
write: Query(
Lambda(
["oldData", "newData"],
And(
Equals(Identity(), Var("oldData")),
Equals(
Select(["data", "email"], Var("oldData")),
Select(["data", "email"], Var("newData"))
)
)
)
),
create: false,
delete: false,
history_read: false,
history_write: false,
unrestricted_read: false
}
},
Any ideas?