Consolidate firestore rules for subcollections
This commit is contained in:
parent
595d373fb1
commit
18376f8a3f
|
@ -27,25 +27,13 @@ service cloud.firestore {
|
|||
allow delete: if resource.data.creatorId == request.auth.uid;
|
||||
}
|
||||
|
||||
match /contracts/{contractId}/bets/{betId} {
|
||||
allow read;
|
||||
}
|
||||
|
||||
match /{somePath=**}/bets/{betId} {
|
||||
allow read;
|
||||
}
|
||||
|
||||
match /contracts/{contractId}/comments/{commentId} {
|
||||
allow read;
|
||||
allow create: if request.auth != null;
|
||||
}
|
||||
|
||||
match /{somePath=**}/comments/{commentId} {
|
||||
allow read;
|
||||
}
|
||||
|
||||
match /contracts/{contractId}/answers/{answerId} {
|
||||
allow read;
|
||||
allow create: if request.auth != null;
|
||||
}
|
||||
|
||||
match /{somePath=**}/answers/{answerId} {
|
||||
|
@ -57,13 +45,9 @@ service cloud.firestore {
|
|||
allow update, delete: if request.auth.uid == resource.data.curatorId;
|
||||
}
|
||||
|
||||
match /folds/{foldId}/followers/{userId} {
|
||||
match /{somePath=**}/followers/{userId} {
|
||||
allow read;
|
||||
allow write: if request.auth.uid == userId;
|
||||
}
|
||||
|
||||
match /{somePath=**}/followers/{userId} {
|
||||
allow read;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user