I have this data structure:
and need a rule that only allows updates when the city attribute is not changed:
match /requests/{requestId} {
allow update: if (request.resource.data.diff(resource.data).unchangedKeys().
hasAll(["customerlocation.city"]))
That doesn't work, because the diff result only shows the customerlocation field, but not the city attribute.
Is it even possible to achieve what I want? I know there are limitations wrt what you can do with nested objects in security rules, but I have might just missed something.
