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