Cloud Firestore berbeda dengan video

Beranda › Forums › Belajar Flutter Mobile Apps Tingkat Mahir › Cloud Firestore berbeda dengan video

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #190378
    Erick Darmawan
    Participant

      Coach saya mau tanya, di Praktik part II dari Flutter Mobile Apps Level Advanced berbeda di video berdurasi 03:55, karena di video coach di Cloud Firestore dalam Rules katanya:

      rules_version = ‘2’;
      service cloud.firestore {
      match /databases/{database}/documents{
      match /todos/{document=**} {
      allow read. write: if
      request.auth != null;
      }
      }
      }

      tapi punya saya di cloud firestore malah berbeda, punya saya seperti ini:

      rules_version = ‘2’;
      service cloud.firestore {
      match /databases/{database}/documents {
      match /{document=**} {
      allow read, write: if false;
      }
      }
      }

      Ini kenapa berbeda?
      Apa karena codingan saya salah?

      Mohon di balas.
      Terima Kasih.

      #191002
      Anonymous

        Hallo, itu rules punya kamu sepertinya sudah pernah diubah agar tidak memperbolehkan read dan write.
        kamu bisa tonton videonya ya diseuaikan aja dengan keinginan untuk rules nya, kalau kamu ingin ngeallow semua read and write bisa ganti menjadi
        allow read, write;
        tapi kalau kamu mau agar yang bisa mengakses dokument / data kamu hanya user yang sudah login, bisa menggunakan

        allow read. write: if
        request.auth != null;

        yang mana artinya kita hanya nge allow/ bolehin data di read dan write saat request tersebut mengandung authentication.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.
      Shopping cart0
      There are no products in the cart!
      Continue shopping