-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirestore.rules
More file actions
22 lines (19 loc) · 782 Bytes
/
firestore.rules
File metadata and controls
22 lines (19 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Sessions: authenticated users can only access their own
match /sessions/{sessionId} {
allow read, write: if request.auth != null
&& request.auth.uid == resource.data.patientId;
allow create: if request.auth != null
&& request.auth.uid == request.resource.data.patientId;
}
// Briefs: authenticated users can only access their own
match /briefs/{briefId} {
allow read, write: if request.auth != null
&& request.auth.uid == resource.data.patientId;
allow create: if request.auth != null
&& request.auth.uid == request.resource.data.patientId;
}
}
}