forked from oatkrs/resumake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
securitytRules.txt
40 lines (38 loc) · 974 Bytes
/
securitytRules.txt
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
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
function isAuthenticated(){
return request.auth != null;
}
function isA(){
return isAuthenticated() && get( /databases/$(database)/documents/users/$(request.auth.uid)).data.isA==true;
}
match /users/{userId}/{resumes=**} {
allow read, update, delete: if isAuthenticated() && request.auth.uid == userId;
allow create: if request.auth != null;
}
match /data/id {
allow read,write,update;
}
match /ads/{ads} {
allow read ;
allow write : if isA();
}
match /pages/{pages} {
allow read ;
allow write : if isA();
}
match /data/stats {
allow write;
allow read : if isA();
}
match /data/details {
allow read;
allow write : if isA();
}
match /data/social {
allow read;
allow write : if isA();
}
}
}