-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirestore.rules
More file actions
34 lines (33 loc) · 997 Bytes
/
firestore.rules
File metadata and controls
34 lines (33 loc) · 997 Bytes
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
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /mail/{document=**}{
allow read, write, create;
}
match /beginner_project/{document=**}{
allow read, write, create;
}
match /user_information/{userId} {
allow create: if true;
}
match /lessons/{document=**}{
allow read, write, create;
}
match /user_information/{userId} {
allow create: if true;
}
match /user_information/{document=**} {
// user can read & write their own information (username, tagline)
allow read, write, create:
if request.auth != null &&
(request.auth.uid == resource.id || request.auth.token.email == resource.id);
//user can read & write their projects information (name, hostname, username, etc.)
match /projects/{projectID}{
allow read, write, create;
match /buttonList/{buttonID}{
allow read, write, create;
}
}
}
}
}