Created
          October 4, 2017 04:24 
        
      - 
      
- 
        Save SUPERCILEX/cd9902ccaa5d448baa9c6830a26ab6fd to your computer and use it in GitHub Desktop. 
Revisions
- 
        SUPERCILEX created this gist Oct 4, 2017 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ service cloud.firestore { match /databases/{database}/documents { // Incorrect solution match /public/{doc=**} { allow read; match /foo/{bar} { allow write: if doc == "foobar"; // Error! "doc" is a path object, not a string } } // Correct solution match /public/{doc} { allow read; match /foo/{bar} { allow read; allow write: if doc == "foobar"; // Correct, "doc" is now the document id } } } }