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