title: user-security on firebase for login users
body: <p>I am trying to set rules that admin node can write &amp; read all nodes of events,
  Also user can read/write/create to his node.
  My issue I am getting  permission denied when I am running my app.
  My rules are:</p>
  
  <pre><code>{
    "rules": {
      "events": {
         ".read": "root.child('admin').hasChild(auth.uid)",
         ".write": "root.child('admin').hasChild(auth.uid)",
        "$uid": {
          ".write": "$uid === auth.uid",
           ".read": "auth != null &amp;&amp; auth.uid == $uid"
        }
      },
  </code></pre>
  
  <p>My code :</p>
  
  <pre><code> constructor(public af: AngularFire, public userData: UserData) {
      this.smartTableData = this.af.database.list('events/' + this.userData.user.uid + '/contacts');
    }
  </code></pre>