-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage.devfest.rules
54 lines (53 loc) · 1.23 KB
/
storage.devfest.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/{bucket}/o {
match /logo {
match /{allPaths=**} {
allow read: if true;
}
match /{imageId} {
allow write: if request.resource.size < 5 * 1024 * 1024
&& request.resource.contentType.matches('image/.*');
}
}
match /facture {
match /{allPaths=**} {
allow read: if true;
allow write: if isAdministrator();
}
}
match /flyers {
match /{allPaths=**} {
allow read: if true;
allow write: if isAdministrator();
}
}
match /devis {
match /{allPaths=**} {
allow read: if true;
allow write: if isAdministrator();
}
}
match /conventionSigned {
match /{allPaths=**} {
allow read: if true;
allow write: if true;
}
}
match /signed {
match /{allPaths=**} {
allow read: if true;
allow write: if true;
}
}
match /convention {
match /{allPaths=**} {
allow read: if true;
allow write: if isAdministrator();
}
}
}
}
function isAdministrator() {
return request.auth.token.email.matches(".*@devlille.fr")
}