Skip to content

Commit

Permalink
updating rules
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrm committed Nov 13, 2017
1 parent f6b529b commit c8a4afb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions database.rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@
"$townHallID": {
".validate": "newData.hasChildren(['Member','eventId'])"
}
},
"state_legislators_user_submission" : {
"$state":{
".read": "true",
".write": "auth.uid !== null",
"$townHallID": {
".validate": "newData.hasChildren(['Member','eventId'])"
}
}
},
"MOCs" : {
".read": "true",
Expand Down Expand Up @@ -84,6 +93,29 @@
"$mocKey": {
".write": "root.child('users').child(auth.uid).child('isAdmin').val() == true"
}
},
"state_legislators_data" : {
".read": "true",
"$state": {
".read": "true",
".write": "root.child('users').child(auth.uid).child('isAdmin').val() == true || root.child('users').child(auth.uid).child('dataIntern').val() == true",
"lastUpdatedBy": {
".write": "auth.uid !== null"
},
"lastUpdated": {
".write": "auth.uid !== null"
},
"currentEvents" : {
".write": "auth.uid !== null"
}
}
},
"state_legislators_id" : {
".read": "true",
"$state": {
".read": "true",
".write": "root.child('users').child(auth.uid).child('isAdmin').val() == true"
}
},
"mocByStateDistrict" : {
".read": "true",
Expand Down

0 comments on commit c8a4afb

Please sign in to comment.