0
Firestoreのルールの助けを借りて、以下のシナリオを確立しようとしています。Firestoreセキュリティルールは1つのコレクションにのみ認証されないアクセスを許可します
「製品」コレクションに認証なしでアクセスできるようにするにはどうすればよいですか?私はルールを以下のように入れてみましたが、うまくいきません。
service cloud.firestore {
match /databases/{database}/documents {
// All should be able to access products collection
match /products {
allow read;
}
// All other collection should only be accessed if user is authenticated.
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
を私はあなたが '一致/製品/ {文書= **}' –
公共のコレクションがある場合はどう/ショップ/ {shopId} /製品が必要だと思います –
それから、おそらく、/ shop/{shopId}/products/{document = **} ' –