Guidelines:
match /transactions/{transaction} {
allow read: if request.auth.uid == resource.data.user_id;
}
Data Source:
https://i.sstatic.net/MNLGP.jpg
Database File:
this.transCollection = afs.collection<Transaction>('transactions',ref => ref.where('cust_id', '==', this.cust_id).orderBy('created','desc'));
this.transactions = this.transCollection.snapshotChanges().pipe(
map(actions => actions.map(a => {
const data = a.payload.doc.data() as Transaction;
const id = a.payload.doc.id;
return { id, data };
}))
);
Error: core.js:1673 ERROR Error: Missing or insufficient permissions.