From e22992e29801e04ca4352045c5bd2f36eac1c31c Mon Sep 17 00:00:00 2001 From: Alberto Duarte Delgado Date: Wed, 1 Apr 2026 13:32:56 +0100 Subject: filtrado de oficinas y favoritos --- firestore.rules | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'firestore.rules') diff --git a/firestore.rules b/firestore.rules index 2b1537a..b1de5ef 100644 --- a/firestore.rules +++ b/firestore.rules @@ -38,6 +38,14 @@ service cloud.firestore { allow delete: if false; } + match /users/{userId}/favorites/{officeId} { + allow create: if isOwner(userId) + && request.resource.data.officeId == officeId; + allow read: if isOwner(userId); + allow delete: if isOwner(userId); + allow update: if false; + } + match /offices/{officeId} { allow read: if isSignedIn(); allow write: if false; -- cgit v1.2.3-54-g00ecf