0
votes

Noob question on Firestore Security Rules. Read the docs, not sure on this.

Can I have multiple security rules? I'm using the UI console for Firebase > Database > Rules

I see the editor, but I'm not sure, do they intend all rules to be put in this single document, or are there multiple documents each with a different rule? I expected to see a list of them I could edit.

There was a comment in one of the docs about updating in the UI console vs in a user directory. Is this referring to the virtual linux machine? I get into that via web based cloud shell and move around, but the home directory for my project is empty (except for the ReadMe) even after publishing a change to the rule in the Rules tab of the Firestore control panel.

Thanks!

2

2 Answers

1
votes

Can I have multiple security rules?

Yes, and the documentation shows examples of multiple rules. Rules would be pretty useless without the ability to write more than one.

There was a comment in one of the docs about updating in the UI console vs in a user directory. Is this referring to the virtual linux machine?

If you want to deploy from a local machine, it doesn't matter what you use. You just have to be able to run the Firebase CLI.

0
votes

At the moment all rules for a Firestore project are stored in a single file. Work is under way to allow multiple separate files, but at the moment you'll have to include everything in one file.