Skip to content

Commit

Permalink
Update firestore.rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazuh authored Oct 30, 2023
1 parent 837d5fb commit 7f92627
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /session/{document=**} {
allow read, write: if
request.auth.uid != null;
allow read, write: if
request.auth.uid != null;
}
match /calls/{callId}/users/{document=**} {
allow create: if
request.auth.uid != null && request.auth.uid == request.resource.data.userUid;
match /calls/{callId}/users/{document=**} {
allow create: if
request.auth.uid != null && request.auth.uid == request.resource.data.userUid;
allow read, list: if
request.auth.uid != null;
allow update: if
request.auth.uid != null && get(/databases/$(database)/documents/calls/$(callId)).data.hostId == request.auth.uid;
request.auth.uid != null && get(/databases/$(database)/documents/calls/$(callId)).data.hostId == request.auth.uid;
allow delete: if
request.auth.uid != null && (get(/databases/$(database)/documents/calls/$(callId)).data.hostId == request.auth.uid || request.auth.uid == resource.data.userUid);
request.auth.uid != null && (get(/databases/$(database)/documents/calls/$(callId)).data.hostId == request.auth.uid || request.auth.uid == resource.data.userUid);
}
match /calls/{callId}/p2p-descriptions/{descriptionId} {
allow create, update, delete: if
Expand All @@ -22,12 +22,12 @@ service cloud.firestore {
request.auth.uid != null
}
match /calls/{document} {
allow read: if
request.auth.uid != null;
allow read: if
request.auth.uid != null;
allow create: if
request.auth.uid != null && request.auth.uid == request.resource.data.hostId;
allow update, delete: if
request.auth.uid != null && request.auth.uid == resource.data.hostId;
allow update, delete: if
request.auth.uid != null && request.auth.uid == resource.data.hostId;
}
}
}
}

0 comments on commit 7f92627

Please sign in to comment.