forked from ryohey/signal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firestore.rules
19 lines (19 loc) · 890 Bytes
/
firestore.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /songs/{songId} {
allow read, delete: if request.auth != null && request.auth.uid == resource.data.userId;
allow update: if request.auth != null && request.auth.uid == resource.data.userId && !('uid' in request.writeFields);
allow create: if request.auth != null && request.auth.uid == request.resource.data.userId;
}
match /songData/{songDataId} {
allow read, delete: if request.auth != null && request.auth.uid == resource.data.userId;
allow update: if request.auth != null && request.auth.uid == resource.data.userId && !('uid' in request.writeFields);
allow create: if request.auth != null && request.auth.uid == request.resource.data.userId;
}
match /midis/{midiId} {
allow read: if true
allow write: if false
}
}
}