为什么Firebase要求阅读访问以将一些内容写入集合中?
为什么Firebase要求我阅读许可以便在集合中写东西?
这是我要做的事情:
setDoc(doc(db, "UserOrders", {arguments[4] + 1}), {
name: arguments[0],
lastname: arguments[1],
image: arguments[2],
contact: arguments[3],
orderNumber: arguments[4] + 1
});
显然应该将一些信息写入集合中,并且它与读取属性无关,但是当我尝试执行此代码时,我会收到下一个错误。
这是我的射击规则:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow create, write: if true;
}
}
}
Why does the firebase asks me for reading permision in order to write something in a collection?
Here is what i am trying to do:
setDoc(doc(db, "UserOrders", {arguments[4] + 1}), {
name: arguments[0],
lastname: arguments[1],
image: arguments[2],
contact: arguments[3],
orderNumber: arguments[4] + 1
});
Obviously it is supposed to write some information into a collection, and it has nothing to do with the read property, but when i attempt to execute this code i get the next error;
Here are my firebase rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow create, write: if true;
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论