User ID:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Allow users to create their own user document
match /users/{userId} {
allow create: if request.auth != null && request.auth.uid == userId;
allow read, update, delete: if request.auth.uid == userId;
}
// Allow authenticated users to read and write to their own orders
match /users/{userId}/{orderType}Orders/{orderId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}
Type:
Customer:
Amount: AED
Status:
Created At:
Order ID: