Skip to content

Commit c8a4afb

Browse files
committed
updating rules
1 parent f6b529b commit c8a4afb

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

database.rules.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@
5454
"$townHallID": {
5555
".validate": "newData.hasChildren(['Member','eventId'])"
5656
}
57+
},
58+
"state_legislators_user_submission" : {
59+
"$state":{
60+
".read": "true",
61+
".write": "auth.uid !== null",
62+
"$townHallID": {
63+
".validate": "newData.hasChildren(['Member','eventId'])"
64+
}
65+
}
5766
},
5867
"MOCs" : {
5968
".read": "true",
@@ -84,6 +93,29 @@
8493
"$mocKey": {
8594
".write": "root.child('users').child(auth.uid).child('isAdmin').val() == true"
8695
}
96+
},
97+
"state_legislators_data" : {
98+
".read": "true",
99+
"$state": {
100+
".read": "true",
101+
".write": "root.child('users').child(auth.uid).child('isAdmin').val() == true || root.child('users').child(auth.uid).child('dataIntern').val() == true",
102+
"lastUpdatedBy": {
103+
".write": "auth.uid !== null"
104+
},
105+
"lastUpdated": {
106+
".write": "auth.uid !== null"
107+
},
108+
"currentEvents" : {
109+
".write": "auth.uid !== null"
110+
}
111+
}
112+
},
113+
"state_legislators_id" : {
114+
".read": "true",
115+
"$state": {
116+
".read": "true",
117+
".write": "root.child('users').child(auth.uid).child('isAdmin').val() == true"
118+
}
87119
},
88120
"mocByStateDistrict" : {
89121
".read": "true",

0 commit comments

Comments
 (0)