Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@
}
]
},
{
"collectionGroup": "archivedTestimony",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "billId",
"order": "ASCENDING"
},
{
"fieldPath": "court",
"order": "ASCENDING"
},
{
"fieldPath": "ballotQuestionId",
"order": "ASCENDING"
},
{
"fieldPath": "version",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "bills",
"queryScope": "COLLECTION",
Expand Down Expand Up @@ -727,6 +749,31 @@
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "ballotQuestions",
"queryScope": "COLLECTION",
"fields": [
{ "fieldPath": "electionYear", "order": "ASCENDING" },
{ "fieldPath": "ballotStatus", "order": "ASCENDING" }
]
},
{
"collectionGroup": "publishedTestimony",
"queryScope": "COLLECTION_GROUP",
"fields": [
{ "fieldPath": "ballotQuestionId", "order": "ASCENDING" },
{ "fieldPath": "publishedAt", "order": "DESCENDING" }
]
},
{
"collectionGroup": "publishedTestimony",
"queryScope": "COLLECTION",
"fields": [
{ "fieldPath": "billId", "order": "ASCENDING" },
{ "fieldPath": "court", "order": "ASCENDING" },
{ "fieldPath": "ballotQuestionId", "order": "ASCENDING" }
]
}
],
"fieldOverrides": [
Expand Down Expand Up @@ -865,6 +912,17 @@
"queryScope": "COLLECTION_GROUP"
}
]
},
{
"collectionGroup": "publishedTestimony",
"fieldPath": "ballotQuestionId",
"ttl": false,
"indexes": [
{
"order": "ASCENDING",
"queryScope": "COLLECTION_GROUP"
}
]
}
]
}
4 changes: 4 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ service cloud.firestore {
allow read, write: if request.auth.token.get("role", "user") == "admin"
}
}
match /ballotQuestions/{id} {
allow read: if true;
allow write: if false;
}
match /transcriptions/{tid} {
// public, read-only
allow read: if true
Expand Down
Loading