-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathstorage.rules
38 lines (38 loc) · 1.47 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
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /characters/{userId}/characters/{characterId}/{allPaths=**} {
allow read;
allow write: if request.auth.uid == userId
&& request.resource.size < 5 * 1024 * 1024
&& request.resource.contentType.matches('image/.*');
allow delete: if request.auth.uid == userId;
}
match /worlds/{worldId}{
match /locations/{locationId}/{allPaths=**} {
allow read: if request.auth.uid != null;
allow write: if request.auth.uid != null
&& request.resource.size < 5 * 1024 * 1024
&& request.resource.contentType.matches('image/.*');
allow delete: if request.auth.uid != null;
}
match /npcs/{npcId}/{allPaths=**} {
allow read: if request.auth.uid != null;
allow write: if request.auth.uid != null
&& request.resource.size < 5 * 1024 * 1024
&& request.resource.contentType.matches('image/.*');
allow delete: if request.auth.uid != null;
}
match /lore/{loreId}/{allPaths=**} {
allow read: if request.auth.uid != null;
allow write: if request.auth.uid != null
&& request.resource.size < 5 * 1024 * 1024
&& request.resource.contentType.matches('image/.*');
allow delete: if request.auth.uid != null;
}
}
match /{allPaths=**} {
allow read, write: if false;
}
}
}