0

私のFirebaseアプリケーションでは、異なるデータに異なるルールを適用する必要があります。Firebaseデータベース、各データデータの異なるルール

例:私のデータは、ログインお問い合わせデータなし

ContactUs 
    -Ksdasda4sd 
     name: "Ram" 
     email: "[email protected]" 
     message: "Hello how are u" 
HotelLocation 
    -Ksdaseeesd 
     name: "Hotel Name" 
     address: "Near Highway" 
     city: "Bangalore" 

ですがHotelsLocationsは読んでのみログイン後に書くことができ、公開によって読み書きすることができます。

この設定では両方とも認証が必要です。

{ 
    "rules": { 
    ".read": "auth != null", 
    ".write": "auth != null" 
    } 
} 

缶は、それが

+0

https://firebase.google.com/docs/database/security/securing-data – cartant

+0

を設定することができ、Uに感謝 – Manu

答えて

1

可能これが設定されています。

{ 
    "rules": { 
    "contactme" : { 
     ".read": "auth != null", 
     ".write": "true" 
    }, 
    "HotelLocation" : { 
     ".read": "auth != null", 
     ".write": "auth != null" 
    } 

    } 
} 
関連する問題