-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstorage.rules
54 lines (45 loc) · 2.04 KB
/
storage.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
rules_version = '2';
service firebase.storage {
match /b/build-order-guide.appspot.com/o {
match /{allPaths=**} {
allow read;
}
}
}
service cloud.firestore {
match /databases/{database}/documents {
match /users/{uid} {
allow read: if request.auth != null && request.auth.uid == uid;
allow write: if request.auth != null && request.auth.uid == uid;
}
match /matches/{uid}/data/{matchId} {
allow read: if request.auth != null && request.auth.uid == uid;
allow write: if request.auth != null && request.auth.uid == uid;
}
match /builds/{document=**} {
allow write: if request.auth != null && request.resource.data.publisher == request.auth.uid;
allow read: if request.auth != null && resource.data.publisher == request.auth.uid;
allow write: if request.auth != null && request.auth.uid == 'nOuk4lquYrXt4H2xafiZpPUFvN82';
allow read: if request.auth != null && request.auth.uid == 'nOuk4lquYrXt4H2xafiZpPUFvN82';
}
match /published-builds/{document=**} {
allow write: if request.auth != null && request.resource.data.publisher == request.auth.uid;
allow delete: if request.auth != null && resource.data.publisher == request.auth.uid;
allow read;
allow write: if request.auth != null && request.auth.uid == 'nOuk4lquYrXt4H2xafiZpPUFvN82';
allow delete: if request.auth != null && request.auth.uid == 'nOuk4lquYrXt4H2xafiZpPUFvN82';
}
match /leagues/{uid} {
allow read;
allow write: if request.auth != null && request.auth.uid == 'nOuk4lquYrXt4H2xafiZpPUFvN82';
allow delete: if request.auth != null && request.auth.uid == 'nOuk4lquYrXt4H2xafiZpPUFvN82';
}
match /ratings/{document=**} {
allow write: if request.auth != null && request.resource.data.user_id == request.auth.uid && request.resource.data.rating >= 1 && request.resource.data.rating <= 5;
allow read: if request.auth != null && resource.data.user_id == request.auth.uid;
}
match /ratings-aggregate/{document=**} {
allow read;
}
}
}