尽管规则允许所有访问权限,但访问权限被拒绝Firebase Firestore

时间:2019-07-15 00:36:24

标签: java android firebase google-cloud-firestore firebase-security-rules

每当我尝试将新文件从Android应用发布到我的Firestore时,都会出现关于拒绝写入的错误: W / RepoOperation:/ choreList / 1QTTJU4QRY处的setValue失败:DatabaseError:权限被拒绝

我的应用程序权限设置为

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read;
      allow write;
    }
  }
}

所以他们应该允许一切,但现在他们没有了。

我尝试设置值的代码是:

public void sendItem( View view){
        String appID;
        String description;
        int length;
        description = choreText.getText().toString();
        length = Integer.parseInt(lengthText.getText().toString());
        appID = getSaltString();
        chore chore = new chore(appID, description, length);

        mDatabase.child("choreList").child(appID).setValue(chore);
    }

0 个答案:

没有答案
相关问题