RomainMarecat/slate

View on GitHub
firestore.rules

Summary

Maintainability
Test Coverage
service cloud.firestore {
match /databases/{database}/documents {
match /{cart=**} {
allow get: if true;
allow list: if true;
allow create: if true;
allow update: if request.auth.uid != null;
allow delete: if request.auth.uid == 'CiKK3i9fIjRmbgKvWbQG5xWDNT72';
}
match /{order=**} {
allow get: if true;
allow list: if true;
allow create: if request.auth.uid != null;
allow update: if request.auth.uid != null;
allow delete: if request.auth.uid == 'CiKK3i9fIjRmbgKvWbQG5xWDNT72';
}
 
match /{payment=**} {
allow get: if request.auth.uid == resource.data.user;
allow list: if request.auth.uid == resource.data.user || request.auth.uid == 'CiKK3i9fIjRmbgKvWbQG5xWDNT72';
allow create: if request.auth.uid != null;
allow update: if request.auth.uid == resource.data.user;
allow delete: if request.auth.uid == 'CiKK3i9fIjRmbgKvWbQG5xWDNT72';
}
 
match /{favorite=**} {
allow get: if true;
allow list: if request.auth.uid != null;
allow create: if request.auth.uid != null;
allow update: if request.auth.uid != null;
allow delete: if request.auth.uid != null;
}
 
match /{product=**} {
allow read: if true;
allow create: if false;
allow update: if request.auth.uid == 'CiKK3i9fIjRmbgKvWbQG5xWDNT72' ||
(resource.data.viewed < request.data.viewed);
allow delete: if false;
}
 
match /{category=**} {
allow read: if true;
allow write: if false;
}
 
match /{article=**} {
allow read: if true;
allow write: if false;
}
 
match /{area=**} {
allow read: if true;
allow write: if false;
}
 
match /{session=**} {
allow read: if true;
allow write: if false;
}
match /{attribute=**} {
allow read: if true;
allow write: if false;
}
match /{contact=**} {
allow read: if true;
allow get: if true;
allow list: if true;
allow create: if true;
allow update: if true;
allow delete: if false;
}
match /{conversation=**} {
allow read: if true;
allow get: if true;
allow list: if true;
allow create: if request.auth.uid != null;
allow update: if request.auth.uid != null;
allow delete: if false;
}
match /{comment=**} {
allow read: if true;
allow write: if false;
}
match /{cms=**} {
allow read: if true;
allow write: if false;
}
match /cms-detail {
allow read: if true;
allow write: if false;
}
match /{event=**} {
allow read: if true;
allow write: if false;
}
match /{map=**} {
allow read: if true;
allow write: if false;
}
match /{media=**} {
allow read: if true;
allow write: if false;
}
match /{offer=**} {
allow read: if true;
allow write: if false;
}
match /{scores=**} {
allow read: if true;
allow write: if false;
}
match /{partner=**} {
allow read: if true;
allow write: if false;
}
match /{post=**} {
allow read: if true;
allow write: if false;
}
}
}