【发布时间】:2019-04-06 11:32:57
【问题描述】:
规则:
match /transactions/{transaction} {
allow read: if request.auth.uid == resource.data.user_id;
}
数据库:
ts 文件:
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 };
}))
);
错误: core.js:1673 ERROR 错误:权限缺失或不足。
【问题讨论】:
-
请更新您的问题以包含可以触发此错误的最少代码。
-
代码在没有安全规则的情况下运行良好@FrankvanPuffelen
标签: typescript firebase google-cloud-firestore firebase-security