I just want to retrieve the images to all users using this data structure:
But I am getting this console error:
Error: permission_denied: Client doesn’t have permission to access the desired data.
This is my security settings on Firebase:
{
"rules": {
"Dogs": {
"User":{
"$uid": {
"Pet": {
".write": true,
".read": true
}
}
}
}
}
}
And this is my controller that I use to show the images:
var firebaseObj = new Firebase("https://<MY-APP>.firebaseio.com/Dogs");
var sync = $firebaseArray(firebaseObj);
var fbAuth = $firebaseAuth(firebaseObj);
var userReference = firebaseObj.child("User/"+fbAuth.uid);
var syncArray = $firebaseArray(userReference.child("Pet"));
$scope.Dogs = syncArray;