質問

Let's say I've created a fresh Email / Password user for my Firebase collection called bob@example.com

How do I now limit the write access to anything in that collection to specifically this user?

{
  "rules": {
    ".read": true,
    ".write": false
  }
}

...?
役に立ちましたか?

解決

You might have to get a bit more specific to get anything more helpful than the security rules documentation. But to answer your question, let's say you wanted to limit your entire Firebase write access to Bob:

{
  "rules": {
    ".read": true,
    ".write": "auth.email == 'bob@example.com'"
  }
}

Let's say you want to restrict an item collection in your Firebase just to Bob:

{
  "rules": {
    ".read": true,
    "items": {
      ".write": "auth.email == 'bob@example.com'"
    }
  }
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top