Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (19 sloc) 716 Bytes
service cloud.firestore {
match /databases/{database}/documents {
match /posts/{post} {
allow read: if true;
allow create: if request.auth.uid == request.resource.data.createdBy;
allow update, delete: if request.auth.uid == resource.data.createdBy;
}
match /postLikes/{postLike} {
allow read: if true;
allow create: if request.auth.uid == request.resource.data.user;
allow update, delete: if request.auth.uid == resource.data.user;
}
match /subscriptions/{subscription} {
allow read: if true;
allow create: if request.auth.uid == request.resource.data.user;
allow update, delete: if request.auth.uid == resource.data.user;
}
}
}