Skip to content

Instantly share code, notes, and snippets.

@ra9r
Created September 27, 2022 09:56
Show Gist options
  • Select an option

  • Save ra9r/5e4ca2a1aeaa5ba3fbd02f0f132c5efe to your computer and use it in GitHub Desktop.

Select an option

Save ra9r/5e4ca2a1aeaa5ba3fbd02f0f132c5efe to your computer and use it in GitHub Desktop.
This is an example of how to restrict read, edit, update to content owner only.
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents/weight {
    match /{document=**} {
        allow write: if true;
      allow read, write, delete: if
          request.auth != null && request.auth.uid == d;
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment