Firebase存储规则以在Firestore文档上查找数据? [英] Firebase Storage rules to lookup data on Firestore document?

查看:64
本文介绍了Firebase存储规则以在Firestore文档上查找数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能类似于Firestore的get()函数的Firebase存储规则?

Is it possible to have a Firebase Storage rule that is similar to the get() function of Firestore?

基本上,我想检查Firestore中的用户文档以允许在Storage中进行写操作.

Basically I would like to check the user document in Firestore to allow writes in Storage.

我认为处理索赔是最好的解决方案,但是我不确定我是否可以使用它.

I guess working with claims would be the best solution, but I'm not sure I can use that.

我想要这样的东西:

allow create: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.canDoSomeStuff == true;

推荐答案

当前,任何Firebase产品的安全规则都无法超出其自己的产品.随时为此提交功能请求.

It's currently not possible for security rules for any Firebase product to reach outside of their own product. Feel free to file a feature request for that.

这篇关于Firebase存储规则以在Firestore文档上查找数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆