因此,当我运行条带付款方式时,它给了我 firebase 错误“index.cjs.js:409 Uncaught (in promise) FirebaseError: Missing or enough permissions.” .. .. .. 我已经允许,但它仍然给我错误......你有什么建议我如何解决错误?
这是我的 Firebase 规则:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /environments/{environment}/companies/{userId} {
allow write, read: if request.auth.uid == userId;
match /{anySubCollection}/{anyDocument} {
allow write, read: if request.auth.uid == userId;
}
match /customers/{uid} {
allow read: if request.auth.uid == uid;
match /checkout_sessions/{id} {
allow read, write: if request.auth.uid == uid;
}
match /subscriptions/{id} {
allow read: if request.auth.uid == uid;
}
}
match /products/{id} {
allow read: if true;
allow write: if false;
match /prices/{id} {
allow read: if true;
allow write : if false;
}
match /tax_rates/{id} {
allow read: if true;
}
}
}}}