【问题标题】:How to write rules for user on android firebase storage and cloud firestore如何在 android firebase storage 和 cloud firestore 上为用户编写规则
【发布时间】:2017-12-26 09:37:57
【问题描述】:

我在我的应用程序中使用 Firebase 身份验证,但我很困惑如何编写规则?这样每个用户只能在应用程序中看到他的数据并更新他的数据。 就像我在 documentsampleData 中有一些 Map<String,Object>(hashmap) 并且在集合中是 information。我阅读了指南但对如何编辑规则感到困惑? 我试过了

  service firebase.storage 
   {match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if request.auth!=null;
    }
  }
}

但没用。

【问题讨论】:

  • firebase.google.com/docs/database/security 这是官方链接。你能说出你困惑的地方吗?
  • 您可以从 Firebase 控制台编辑此规则。只需转到您的项目路径,然后将读写标志设置为 true。请仔细阅读此 firebase.google.com/docs/database/security。

标签: android firebase firebase-storage firebase-security


【解决方案1】:

请试试这个: if request.auth==null;

【讨论】:

  • 试过了,提示用户没有访问权限
猜你喜欢
  • 1970-01-01
  • 2020-05-02
  • 2019-12-15
  • 2021-12-25
  • 2018-11-27
  • 2019-06-16
  • 2018-04-02
  • 2018-10-16
  • 2021-06-13
相关资源
最近更新 更多