Hernan Humaña
Hernan Humaña

Reputation: 433

How add ".indexOn" in my security rules of firebase?

i have this warning in my front end

enter image description here

My data in firebase is this:

enter image description here

after basic i have a key, i try with this rule:

{
"rules": {
".read": true,
".write": true,
 "workers": {
    "report":{
   "basic":{
      "$groupid":{
        ".indexOn": "date"
     }}
   }
  }
 }
}

but the warning persist!

how can config the rules in firebase?

Upvotes: 0

Views: 85

Answers (1)

Martin Zeitler
Martin Zeitler

Reputation: 76619

think that the $groupid is not required, because the error message does not have it:

{
  "rules": {
    ".read": true,
    ".write": true,
    "workers" {
      "report" {
        "basic" {
          ".indexOn": "date"
        }
      }
    }
  }
}

... and consider adding further security rules; these permissions are alike 777 on a web-server.

Upvotes: 2

Related Questions