# Retrieve all data by users in firebase

**URL:** <https://forum.ionicframework.com/t/retrieve-all-data-by-users-in-firebase/153687>\
**Category:** ionic-v3\
**Created:** [January 21, 2019, 8:59am UTC](https://forum.ionicframework.com/t/retrieve-all-data-by-users-in-firebase/153687 "2019-01-21T08:59:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aligassan](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@aligassan](https://forum.ionicframework.com/u/aligassan)\
**Post date:** [January 21, 2019, 8:59am UTC](https://forum.ionicframework.com/t/retrieve-all-data-by-users-in-firebase/153687/1 "2019-01-21T08:59:01Z")

</div>

i am try to build blog app using firebase database , l want to allowed to users can they read data post by each others , but unsuccessfully when i used this rules for database

```auto
{
  "rules": {
  "report": {
      "$uid": {
        ".read": "true",
        ".write": "$uid === auth.uid"

      }
    }    

  }
}

```

When l use this rules the users does not read posts for other user ! , only he can read has own post .

main code

```auto
   ionViewWillLoad(){
        this.fire.authState.subscribe(data => {
          if(data && data.email && data.uid){

            this.toastCtrl.create({
              message : ` welcome ${data.email}`,
              duration:2000
            }).present()
            this.itemsRef = this.db.list(`report/${data.uid}`);
            // Use snapshotChanges().map() to store the key
            this.items = this.itemsRef.snapshotChanges().pipe(
              map(changes => 
                changes.map(c => ({ key: c.payload.key, ...c.payload.val() }))
              )
            );

          }

        })

      }

```

[![enter image description here](https://i.stack.imgur.com/26lBh.png)](https://i.stack.imgur.com/26lBh.png)

how can l retrieve the data for every user
