-
Notifications
You must be signed in to change notification settings - Fork 0
/
firestore.rules
22 lines (22 loc) · 926 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
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
function allowedToRead(requestUserId, userId) {
return requestUserId == userId ||
(requestUserId == 'IXqAy9z163RP3E6xlUtRaiCIGu02' && userId == 'x4mf0jrcFzSHUrysfe0lmNCorBW2') ||
(requestUserId == 'yMnqhT0Ai3UTmCSVpP3WY2EZW3M2' && userId == 'zfeIBcTalCeVP0ujWnn2coEK1F63') ||
(requestUserId == 'Fbml0XiSZmPYJ3lfYEioTqGmiGK2' && userId == 'Fd0gpzdUzgeyde9fdp4udKzp3Af2') ||
(requestUserId == '31Nqv4E2juTweNiisBN5pCRhzsl2' && userId == '9C8Tn8SGdjWJzUEXMm8UWXCzOMa2');
}
// Allow user access to only their own data.
match /users/{userId} {
allow read, write: if allowedToRead(request.auth.uid, userId);
}
match /{userId}/{document=**} {
allow read, write: if allowedToRead(request.auth.uid, userId);
}
match /global/version {
allow read;
}
}
}