- Create project in Firebase
- Create Cloud Firestore database instance
- Add collection
courses, in this collection add documenttest, with fieldslessonCountequal to5(number),statusequal todraft(string) andurlequal tohttps://google.com(string) - Add collection
users, in this collectio nadd documentadmin, with fieldisAdminequal totrue, and a new documenttestin collectionuserswithout any field - Move to
rules, apply thefirestore.rules, runRules Playground - Click
Runto forSimulation typeofgetandlocationofcourses/test. Unintuitive error of being not authenticated will pop up - Click
Runto forSimulation typeofgetandlocationofcourses/testwithAuthenticatedset toON. Unintuitive error of is known user will pop up - Click
Runto forSimulation typeofgetandlocationofcourses/testwithAuthenticatedset toONandFirebase UIDset totest. Simulated read allowed will pop up - Change
Simulation typetoupdate. Unintuitive error of admin being able to do so will pop up - Change
Firebase UIDtoadmin. Unintuitive error of is valid course will pop up - Click
Build document, setseqNowithtypeofnumbertovalueof5and seturlwithtypeofstringtovalueofhttps://google.com. ClickRun. Simulated read allowed will pop up
It's supposed to showcase relatively unintuitive environment of Severless Security