Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "rules": {
- "chats": {
- "$chatID": {
- "messages": {
- ".read": "data.parent().child('members').child(auth.uid).exists()",
- ".write": "data.parent().child('members').child(auth.uid).val() == 'owner' || data.parent().child('members').child(auth.uid).val()=='chatter'"
- },
- "members": {
- ".read": "data.child(auth.uid).val() == 'owner'",
- ".write": "data.child(auth.uid).val() == 'owner' ||(!data.exists()&&newData.child(auth.uid).val()=='owner')"
- },
- "pending": {
- ".read": "data.parent().child('members').child(auth.uid).val() === 'owner'",
- ".write": "data.parent().child('members').child(auth.uid).val() === 'owner'",
- "$uid": {
- ".write": "$uid === auth.uid && !data.exists() && !data.parent().parent().child('members').child($uid).exists()"
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement