Tag: gcp

Firestore:允许拒绝权限的事务

我们从Java应用程序引擎实例访问Firestore 。 非事务性请求正在成功,但事务失败并显示错误: firestore: PERMISSION_DENIED: Missing or insufficient permissions 示例交易 final long updatedValue = 15; Firestore db = firebaseManager.getFirestore(); CollectionReference fooCollectionRef = db.collection(SOME_COLLECTION); DocumentReference fooDocumentRef = fooCollectionRef.document(fooId); final ApiFuture future = db.runTransaction(transaction -> { DocumentSnapshot snapshot = transaction.get(fooDocumentRef).get(); transaction.update(fooDocumentRef, SOME_FIELD, updatedValue); return updatedValue; }); return future.get(); 据我所知,我们对开发项目的权限是完全开放的: service cloud.firestore { match /databases/{database}/documents { match /{document=**} […]