-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfirestore.rules
More file actions
42 lines (42 loc) · 1.24 KB
/
firestore.rules
File metadata and controls
42 lines (42 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
match /questions/{id} {
allow read, write: if true;
}
match /tunes/{id} {
allow read, write: if request.auth.uid != null;
}
match /groups/{id} {
allow read, write: if request.auth.uid != null;
}
match /groupMembers/{id} {
allow read, write: if request.auth.uid != null;
}
match /repertories/{id} {
allow read, write: if request.auth.uid != null;
}
match /entries/{id} {
allow read, list: if true;
allow create: if request.auth.uid != null;
allow write: if request.auth.uid != null;
}
match /events/{id} {
allow read, list: if true;
// allow create: if request.auth.uid != null;
// allow write: if request.auth.uid != null;
}
match /votes/{id} {
allow read, list: if true;
// allow write: if request.time.toMillis() <= timestamp.date(2021,12,31).toMillis() && request.auth.uid != null;
allow write: if request.auth.uid == id;
}
match /users/{id} {
allow read, create: if request.auth.uid != null;
allow write: if request.auth.uid == id;
}
}
}