diff options
| author | Alberto Duarte Delgado <alberto@albertoduarte.com> | 2026-04-01 13:32:56 +0100 |
|---|---|---|
| committer | Alberto Duarte Delgado <alberto@albertoduarte.com> | 2026-04-01 13:32:56 +0100 |
| commit | e22992e29801e04ca4352045c5bd2f36eac1c31c (patch) | |
| tree | e9a4d8851ea958062af03527f6816ba94ddb0a85 /firestore.rules | |
| parent | 08ce78dbd97ad792e163482f454f285557c7cdd0 (diff) | |
filtrado de oficinas y favoritos
Diffstat (limited to 'firestore.rules')
| -rw-r--r-- | firestore.rules | 8 |
1 files changed, 8 insertions, 0 deletions
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; |