-
Notifications
You must be signed in to change notification settings - Fork 0
/
firebase-rules.json
129 lines (129 loc) · 5.07 KB
/
firebase-rules.json
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"rules": {
"facebook-users": {
"$user_id": {
".read": "$user_id === auth.uid",
".write": "$user_id === auth.uid",
"friends": {
"$friend_id": {
".read": "$user_id === auth.uid || $friend_id === auth.uid",
"inbox": {
".write": "$friend_id === auth.uid && root.child('facebook-users').child($user_id).child('friends').hasChild($friend_id)",
}
}
},
"clients": {
".read": "$user_id === auth.uid || root.child('facebook-users').child($user_id).child('friends').hasChild(auth.uid)"
}
}
},
"google-users": {
"$user_id": {
".read": "$user_id === auth.uid",
".write": "$user_id === auth.uid",
"friends": {
"$friend_id": {
".read": "$user_id === auth.uid || $friend_id === auth.uid",
"inbox": {
".write": "$friend_id === auth.uid && root.child('google-users').child($user_id).child('friends').hasChild($friend_id)",
}
}
},
"clients": {
".read": "$user_id === auth.uid || root.child('google-users').child($user_id).child('friends').hasChild(auth.uid)"
}
}
},
"simplelogin-users": {
"$user_id": {
".read": "$user_id === auth.uid",
".write": "$user_id === auth.uid",
"friends": {
"$friend_id": {
".read": "$user_id === auth.uid || $friend_id === auth.uid",
"inbox": {
".write": "$friend_id === auth.uid && root.child('simplelogin-users').child($user_id).child('friends').hasChild($friend_id)",
}
}
},
"clients": {
".read": "$user_id === auth.uid || root.child('simplelogin-users').child($user_id).child('friends').hasChild(auth.uid)"
},
"friendRequestsWithToken": {
"$permission_token": {
".write": "root.child('simplelogin-users').child(auth.uid).child('receivedInviteTokens').hasChild($permission_token) && root.child('simplelogin-users').child($user_id).child('generatedInviteTokens').hasChild($permission_token)"
}
},
"receivedFriendRequests": {
"$friend_id": {
".write": "$friend_id === auth.uid"
}
},
"acceptedFriendRequests": {
"$friend_id": {
".write": "$friend_id === auth.uid && root.child('simplelogin-users').child($user_id).child('sentFriendRequests').hasChild($friend_id)"
}
},
"profile": {
".read": "root.child('simplelogin-users').child($user_id).child('friends').hasChild(auth.uid)"
}
}
},
"simplelogin-user-mapping": {
".read": "true",
".write": "true"
},
"v2": {
"facebook-users": {
"$user_id": {
".read": "$user_id === auth.uid",
".write": "$user_id === auth.uid",
"friends": {
"$friend_id": {
".read": "$user_id === auth.uid || $friend_id === auth.uid",
"inbox": {
".write": "$friend_id === auth.uid && root.child('v2/facebook-users').child($user_id).child('friends').hasChild($friend_id)",
},
"inviteResponses": {
"$permission_token": {
".write": "$friend_id === auth.uid && root.child('v2/facebook-users').child(auth.uid).child('receivedPermissionTokens').hasChild($permission_token) && root.child('v2/facebook-users').child($user_id).child('generatedPermissionTokens').hasChild($permission_token)"
}
}
}
},
"clients": {
".read": "$user_id === auth.uid || root.child('v2/facebook-users').child($user_id).child('friends').hasChild(auth.uid)"
},
"profile": {
".read": "root.child('v2/facebook-users').child($user_id).child('friends').hasChild(auth.uid)"
}
}
},
"google-users": {
"$user_id": {
".read": "$user_id === auth.uid",
".write": "$user_id === auth.uid",
"friends": {
"$friend_id": {
".read": "$user_id === auth.uid || $friend_id === auth.uid",
"inbox": {
".write": "$friend_id === auth.uid && root.child('v2/google-users').child($user_id).child('friends').hasChild($friend_id)",
},
"inviteResponses": {
"$permission_token": {
".write": "$friend_id === auth.uid && root.child('v2/google-users').child(auth.uid).child('receivedPermissionTokens').hasChild($permission_token) && root.child('v2/google-users').child($user_id).child('generatedPermissionTokens').hasChild($permission_token)"
}
}
}
},
"clients": {
".read": "$user_id === auth.uid || root.child('v2/google-users').child($user_id).child('friends').hasChild(auth.uid)"
},
"profile": {
".read": "root.child('v2/google-users').child($user_id).child('friends').hasChild(auth.uid)"
}
}
}
}
}
}