【问题标题】:Are updating, creation etc. functionalities of cloud functions affected by the firestore security rules? [duplicate]云功能的更新、创建等功能是否受 Firestore 安全规则的影响? [复制]
【发布时间】:2021-12-11 17:57:40
【问题描述】:

我已经根据用户 ID 制定了几条规则,所以想确认这些规则是否会阻止用 nodejs 编写的云函数完成的更新。

【问题讨论】:

    标签: firebase google-cloud-firestore google-cloud-functions firebase-security


    【解决方案1】:

    您的云功能充当管理员。见How to make Firebase Functions act as a user instead of being an admin?

    Rules 选项卡中有一个名为Rules Playground 的按钮,可用于测试firestore 规则。

    【讨论】:

    • 我希望函数能够通过安全规则。我需要做什么吗?
    • 云函数始终绕过您为Firestore Database 制定的任何规则。所以如果你想绕过它们,你不需要做任何事情,但是如果你需要你的函数在用户权限下运行,你必须自己实现它。
    猜你喜欢
    • 2019-12-27
    • 1970-01-01
    • 2019-11-09
    • 1970-01-01
    • 2018-11-09
    • 2020-04-29
    • 2020-05-28
    • 2020-01-14
    • 2019-12-13
    相关资源
    最近更新 更多