generated from mchirico/ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firestore.rules
24 lines (24 loc) · 1.04 KB
/
firestore.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /items/{item} {
allow read: if true;
allow write: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true
}
match /gmail/{item=**} {
allow read: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true
allow write: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true
}
match /tsexpress/{item=**} {
allow read: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true
allow write: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true
}
match /pomodoro/{item=**} {
allow read: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true
allow write: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true
}
match /{document=**} {
allow read, write: if false;
}
}
}