简体   繁体   English

我可以从另一个文件上传 firestore.rules 吗?

[英]can I upload firestore.rules from another file?

other than firebase deploy --only firestore:rules is there any other solution to upload the rules?除了firebase deploy --only firestore:rules还有其他上传规则的解决方案吗?

the goal is to upload a different rules file without changing the project configuration目标是在不更改项目配置的情况下上传不同的规则文件

The command only tells the Firebase that it should upload the Firestore rules, not which file to upload.该命令仅告诉 Firebase应该上传 Firestore 规则,而不是要上传哪个文件。 What exact file it uploads is actually configured in the firebase.json file for that project.它上传的确切文件实际上是在该项目的firebase.json文件中配置的。 There is no way to specify the file name on the command line though.但是无法在命令行上指定文件名。

What you can do is set up multiple project aliases , one for each rules file you want to use, and then either switch between the aliases with firebase use... or specify the alias with a --project=<alias> flag.可以做的是设置多个项目别名,一个用于您要使用的每个规则文件,然后使用firebase use...在别名之间切换,或者使用--project=<alias>标志指定别名。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 prettier 之类的工具格式化 firestore.rules 文件? - How to format a firestore.rules file with a tool like prettier? 如何调试 firestore.rules 变量和函数? - How to debug firestore.rules variables and functions? 我想使用 flutter 在云 Firestore 上上传 excel 文件 - I want to upload excel file on cloud firestore using flutter Firestore 规则可以有例外吗? - Can Firestore rules have exceptions? 我可以为我拥有的每个集合添加 Firestore 规则吗? - Can I add Firestore rules for each collection I have? 是否需要在项目中初始化 firestore? 或者我可以只在谷歌控制台中编写规则吗? - is it a requirement to initialize firestore inside a project ? or can I just write the rules inside the google console? 如何通过Cloud Functions上传文件到Cloud Storage,并使用Firestore控制对Cloud Storage的访问? - How can I upload files to Cloud Storage through Cloud Functions and use Firestore to control access to Cloud Storage? Firebase 云存储规则能否针对 Firestore 数据进行验证? - Can Firebase Cloud Storage rules validate against Firestore data? 如何在 firebase firestore 设置规则中授予读写权限 - How can give access to read but not write in firebase firestore settting rules 在 Firestore 安全规则中,是否可以在另一个自定义 function 中使用自定义 function? - In Firestore security rules, can a custom function be used inside another custom function?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM