简体   繁体   English

将最新的 Firestore 规则拉取到本地

[英]Pull most recent firestore rules to local

I am deploying rules to Firestore using firebase deploy --only firestore我正在使用firebase deploy --only firestore将规则部署到 Firestore

Is there a way to pull the most recent rules (to stay in-sync), eg in case I or somebody else has made changes through the web UI.有没有办法提取最新的规则(以保持同步),例如,以防我或其他人通过 web UI 进行更改。

Something along the lines of firebase pull --only firestore ? firebase pull --only firestore的内容?

As far the documentations,no direct way to sync the these.However you can use the Method: projects.rulesets.list , which will List Ruleset metadata only and optionally filter the results by Ruleset name and the Method: projects.rulesets.get will get a Ruleset by name including the full Source contents.至于文档,没有直接的方法来同步这些。但是您可以使用方法:projects.rulesets.list ,它将仅列出规则集元数据,并可选择按规则集名称和方法过滤结果:projects.rulesets.get将按名称获取规则集,包括完整的源内容。

The rulesets.list method will list all of them, most recent at the top and rulesets.get method will get you the content when you provide the name/id from the list. rulesets.list 方法将列出所有这些,最新的在顶部,当您提供列表中的名称/id 时,rulesets.get 方法将为您获取内容。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM