title: I don't understand what's wrong with my rules
body: <p>I had setup my rules in the RealtimeDatabase so that only people who created the content can read or updated it, but unfortunately the rules don't work like that. </p>
  
  <p>I also tried various other rules with less security so the issue doesn't lie in my app. </p>
  
  <p><strong>These are my rules which don't let me read my own data.</strong></p>
  
  <pre><code> {
      "rules": {
      "posts": {
         "$uid": {
           ".read": "$uid == auth.uid",
           ".write": "$uid == auth.uid"
         }
       }
     }
  }
  </code></pre>
  
  <p><strong>Code in my app.</strong></p>
  
  <p>Path: user/uid/info
  Value: imageUrl</p>
  
  <pre><code>fun getFireBaseValue(Path: String, Value: String): String {
          FirebaseDatabase.getInstance().getReference(Path).child(Value)
              .addValueEventListener(object : ValueEventListener {
                  override fun onDataChange(p0: DataSnapshot) {
                      val fetchedValue = p0.value.toString()
                  }
  
                  override fun onCancelled(p0: DatabaseError) {
                  }
              })
      }
  </code></pre>
  
  <p>I expected a URL i wrote earlier. But instead I get an error: "<strong>DatabaseError: Permission denied</strong>". 
  As far as I understand the rules, I should be allowed to read my own  data.</p>