From b1b371e708eae0f9ee6a4436e7471be85fbd9601 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Fri, 7 Jan 2022 13:47:55 -0600 Subject: [PATCH] fix rules --- firestore.rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firestore.rules b/firestore.rules index 9d10dc61..f758a19c 100644 --- a/firestore.rules +++ b/firestore.rules @@ -10,7 +10,8 @@ service cloud.firestore { match /contracts/{contractId} { allow read; - allow update: if resource.data.creatorId == request.auth.uid && request.resource.data.keys().hasOnly(["description"]); + allow update: if resource.data.creatorId == request.auth.uid && request.resource.data.diff(resource.data).affectedKeys() + .hasOnly(['description']); allow delete: if resource.data.creatorId == request.auth.uid; }