{ "rules": { "users":{ ".read": "auth != null && root.child('admins').child(auth.uid).val() == true", "$uid": { ".write": "auth != null && auth.uid == $uid", ".read": "auth != null && ( auth.uid == $uid || root.child('admins').child(auth.uid).val() == true)" } }, "tests":{ ".read": "auth != null", ".write": false, }, "Results" : { ".read": "auth != null && root.child('admins').child(auth.uid).val() == true", "$child":{ "$uid": { ".write": "auth != null && auth.uid == $uid &&(!data.exists() || !newData.exists())", ".read": "auth != null && ( auth.uid == $uid || root.child('admins').child(auth.uid).val() == true)" } } }, "admins" :{ ".read":"auth!=null", ".write":"auth != null && root.child('admins').child(auth.uid).val() == true" } } }