0

Ich muss einen Satz von Regeln in Firebase hinzufügen "Sicherheit & Regeln" aber kann es in der neuen Version nicht finden. Regeln sind die folgenden. Ich beziehe mich auf this manual für das Hinzufügen dieser Regeln zu "Sicherheit & Regeln" in Firebase. Ich brauche eine Anleitung, wie, wo diese Regeln hinzuzufügen:Firebase Sicherheit & Regeln

{ 
    "rules": { 

    "users": { 
     "$uid": { 
     // grants write access to the owner of this user account whose uid must exactly match the key ($uid) 
     ".write": "auth !== null && auth.uid === $uid", 
     // grants read access to any user who is logged in --&& auth.provider === 'password' 
     ".read": "auth !== null" 
     } 
    }, 

    "usernames": { 
     "$userName": { 
     // grants write access to the owner of this user account whose uid must exactly match the key ($uid) 
     ".write": "root.child('usernames').child($userName).child('uid').val() == auth.uid || root.child('usernames').child($userName).child('uid').val() == null", 
     // grants read access to any user who is logged in --&& auth.provider === 'password' 
     ".read": "auth !== null" 
     } 
    }, 

    "following": { 
     "$uid": { 
     // grants write access to the owner of this user account whose uid must exactly match the key ($uid) 
     ".write": "auth !== null && auth.uid === $uid", 
     // grants read access to any user who is logged in --&& auth.provider === 'password' 
     ".read": "auth !== null" 
     } 
    }, 

    "followedBy": { 
     "$fid": { 
     "$uid": { 
      // grants write access to the owner of this user account whose uid must exactly match the key ($uid) 
      ".write": "auth !== null && auth.uid === $uid", 
      // grants read access to any user who is logged in --&& auth.provider === 'password' 
      ".read": "auth !== null" 
     } 
     } 
    } 

    } 
} 

Alles, was ich zur Zeit zu sehen ist: enter image description here

Antwort

1

Klicken Sie auf Datenbank auf der linken Seite und es wird Sie haben Optionen oben, klicken Sie auf die Regeln Tab und Sie sehen und können dort Ihre Regeln bearbeiten.

Verwandte Themen