-
Notifications
You must be signed in to change notification settings - Fork 1
/
firestore.rules
38 lines (30 loc) · 969 Bytes
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /images/{Id} {
allow read: if true;
allow write: if request.auth.uid != null;
}
match /navigation/{Id} {
allow read: if true;
allow write: if request.auth.token.superuser || request.auth.token.admin || request.auth.token.editor;
}
match /pages/{Id} {
allow read: if true;
allow write: if request.auth.token.superuser || request.auth.token.admin || request.auth.token.editor;
}
match /posts/{Id} {
allow read;
allow write: if request.auth.token.superuser || request.auth.token.admin || request.auth.token.blogger;
}
match /users/{Id} {
allow read: if true;
allow write: if request.auth.uid != null;
}
match /users-security/{Id} {
allow read;
allow create: if request.auth.uid == Id;
allow update: if request.auth.token.superuser;
}
}
}