File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -109,3 +109,30 @@ REACT_APP_CONFIRMATION_EMAIL_REDIRECT=http://localhost:3000
109
109
```
110
110
REACT_APP_CONFIRMATION_EMAIL_REDIRECT=https://mydomain.com
111
111
```
112
+
113
+ ### Security Rules
114
+
115
+ ```
116
+ {
117
+ "rules": {
118
+ ".read": false,
119
+ ".write": false,
120
+ "users": {
121
+ "$uid": {
122
+ ".read": "$uid === auth.uid || root.child('users/'+auth.uid).child('roles').hasChildren(['ADMIN'])",
123
+ ".write": "$uid === auth.uid || root.child('users/'+auth.uid).child('roles').hasChildren(['ADMIN'])"
124
+ },
125
+ ".read": "root.child('users/'+auth.uid).child('roles').hasChildren(['ADMIN'])",
126
+ ".write": "root.child('users/'+auth.uid).child('roles').hasChildren(['ADMIN'])"
127
+ },
128
+ "messages": {
129
+ ".indexOn": ["createdAt"],
130
+ "$uid": {
131
+ ".write": "data.exists() ? data.child('userId').val() === auth.uid : newData.child('userId').val() === auth.uid"
132
+ },
133
+ ".read": "auth != null",
134
+ ".write": "auth != null",
135
+ },
136
+ }
137
+ }
138
+ ```
You can’t perform that action at this time.
0 commit comments