19 lines
433 B
Plaintext
19 lines
433 B
Plaintext
rules_version = '2';
|
|
service cloud.firestore {
|
|
match /databases/{database}/documents {
|
|
|
|
function userInRoom(rid) {
|
|
return exists(/databases/$(database)/documents/rooms/$(rid)/users/$(request.auth.uid));
|
|
}
|
|
|
|
match /rooms/{rid}/{detail=**} {
|
|
allow read: if userInRoom(rid);
|
|
allow write: if false;
|
|
}
|
|
|
|
match /server/status {
|
|
allow read: if true;
|
|
allow write: if false;
|
|
}
|
|
}
|
|
} |