gpt4 book ai didi

android - 火库 : PERMISSION_DENIED: Missing or insufficient permissions

转载 作者:IT王子 更新时间:2023-10-29 00:08:37 34 4
gpt4 key购买 nike

我收到错误消息

gettingdocuments.com.google.firebase.firestore.FirebaseFirestoreException: PERMISSION_DENIED: Missing or insufficient permissions.

else 语句中的以下代码

db.collection("users")
.get()
.addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
for (DocumentSnapshot document : task.getResult()) {
s(document.getId() + " => " + document.getData());
}
} else {
s("Error getting documents."+ task.getException());
}
}
});

最佳答案

进入数据库 ->规则 ->

用于开发:

allow read, write: if false; 更改为 true;

Note: It's quick solution for development purpose only because it will turns off all the security. So, it's not recommended for production.

用于生产:

如果从 firebase 进行身份验证:更改允许读取,写入:if false;request.auth != null;

关于android - 火库 : PERMISSION_DENIED: Missing or insufficient permissions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46590155/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com