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