-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirestore.rules
106 lines (103 loc) · 2.91 KB
/
firestore.rules
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
rules_version = '2';
service cloud.firestore
{
match /databases/{database}/documents
{
match /employees/{employeeID}
{
allow read, write;
}
function notUpdating(field)
{
return !(field in request.resource.data) || resource.data[field] == request.resource.data[field]
}
match /users/{userID}
{
allow read;
allow update: if notUpdating('email')
&& notUpdating('contact_number')
&& notUpdating('country')
&& notUpdating('created_at')
&& notUpdating('currency')
&& notUpdating('email_verified')
&& notUpdating('filters')
&& notUpdating('full_name')
&& notUpdating('id')
&& notUpdating('is_agree')
&& notUpdating('kyc_status')
&& notUpdating('knight_data')
&& notUpdating('nobility_id')
&& notUpdating('nobility_info')
&& notUpdating('photo_url')
&& notUpdating('referral_code')
&& notUpdating('referrred_by')
&& notUpdating('upline_id')
&& notUpdating('upline_info')
&& request.auth.uid == userID;
match /wallets/{walletID}
{
allow read;
}
match /compute/{computeID}
{
allow read;
}
match /max/{maxID}
{
allow read;
}
match /count/{countID}
{
allow read;
}
match /earnings/{earningID}
{
allow read;
}
match /notifications/{notificationID}
{
allow read, write;
}
match /wallets/{walletID}/logs/{logID}
{
allow read;
}
}
match /kycVerifications/{userID}
{
allow read, write;
}
match /currency/{currencyID}
{
allow read;
}
match /nobilities/{nobilityID}
{
allow read, write;
}
match /promotions/{promotionID}
{
allow read, write;
}
match /enlistKnights/{enlistKnightID}
{
allow read, write;
}
match /transferCrypto/{transferCryptoId}
{
allow read;
}
match /cryptoReport/{cryptoReportId}
{
allow read;
}
match /roles/{cryptoReportId}
{
allow read, write;
}
match /stats/{statId}
{
allow read;
}
}
}