Pavel Poley
Pavel Poley

Reputation: 5597

Firestore collection group rules

I have few questions about collection group:

  1. Is there way to execute request for collection group in Firestore simulator?

  2. Can I add additional parameter for collection group rules for example the following rule is used for collection group

    match /{prefix=**}/access/{email} {
      allow read: if isSignedIn();
    }
    

    before access collection i have one more collection with user id, is is possible to add it as parameter to do some validations?

Upvotes: 2

Views: 378

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317868

  1. No, there currently is no way to simulate a collection group query in the Firestore console. (Actually there is no querying at all except individual document gets.)

  2. There is no way, using security rules, to know any of the other path elements that come before access in the case you're showing. The prefix wildcard actually will not even contain any data at the time of execution.

Upvotes: 4

Related Questions