I'm looking for a way to test the new rule set efficiently. I'd like to test the rules before I make the decision to switch over to Firestore from the Realtime Database. Please provide a solution or indicate if there are any works-in-progress.
I'm looking for a way to test the new rule set efficiently. I'd like to test the rules before I make the decision to switch over to Firestore from the Realtime Database. Please provide a solution or indicate if there are any works-in-progress.
2018-05-26 UPDATE
There now is simulator for Firestore security rules built right into the Firebase console.
Previous answer:
firebaser here
There currently is no simulator for the Firestore security rules. As far as I know one is in the works, but as usual: no promises and no release dates.
As such you can not 'test' the rules but you can customize them as per your requirement. There are various resources which can help you to switch from the Realtime Database to Firestore.
Both the security rules work similarly and there is not so much difference.
Also as per the docs about Firestore Security Rules:
Rules don't cascade unless you use a wildcard.
Data validation happens automatically.
Rules can constrain queries: If a query's results might contain data the user doesn't have access to, the entire query fails.
So if your project is in beta you can try Firestore otherwise as of now Realtime Database is just fine.