title: Firebase Security & Rules
body: <p>I have to add a set of rules in Firebase "Security &amp; Rules" but can't find it in the new version. Rules are the following. I am referring to <a href="https://www.noodl.io/market/product/P201511161733844/social-network-with-firebase-social-network-starter-with-firebase-auth-and-ngcordova" rel="nofollow noreferrer">this manual</a> for adding these rules to "Security &amp; Rules" in Firebase. I need some guide as where to add these rules:</p>
  
  <pre><code>{
    "rules": {
  
      "users": {
        "$uid": {
          // grants write access to the owner of this user account whose uid must exactly match the key ($uid)
          ".write": "auth !== null &amp;&amp; auth.uid === $uid",
          // grants read access to any user who is logged in --&amp;&amp; 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 --&amp;&amp; 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 &amp;&amp; auth.uid === $uid",
          // grants read access to any user who is logged in --&amp;&amp; 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 &amp;&amp; auth.uid === $uid",
            // grants read access to any user who is logged in --&amp;&amp; auth.provider === 'password'
            ".read": "auth !== null"
          }
        }
      }
  
    }
  }
  </code></pre>
  
  <p>All I currently see is:
  <a href="https://i.stack.imgur.com/FHWUT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FHWUT.jpg" alt="enter image description here"></a></p>