From 1222830731a662d71e3188f452db51585f2eccb7 Mon Sep 17 00:00:00 2001 From: steveoh Date: Mon, 5 Aug 2024 19:45:17 -0600 Subject: [PATCH] fix(developer): update rules this allows delete and pause/resume to work --- src/developer/firestore.rules | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/developer/firestore.rules b/src/developer/firestore.rules index 670b8154..6244bc7a 100644 --- a/src/developer/firestore.rules +++ b/src/developer/firestore.rules @@ -6,9 +6,6 @@ service cloud.firestore { function isCurrentUser(uid) { return request.auth.uid == uid; } - function updatingNotes() { - return request.resource.data.diff(resource.data).affectedKeys().hasOnly(['notes']); - } match /databases/{database}/documents { match /clients/{uid} { @@ -16,7 +13,7 @@ service cloud.firestore { } match /keys/{key} { allow read: if isAuthenticated() && (get(/databases/$(database)/documents/keys/$(key)).data.accountId == request.auth.uid); - allow update: if isAuthenticated() && (get(/databases/$(database)/documents/keys/$(key)).data.accountId == request.auth.uid) && updatingNotes(); + allow update: if isAuthenticated() && (get(/databases/$(database)/documents/keys/$(key)).data.accountId == request.auth.uid); } } }