03cbe2086a
Integrates a testimonial system to display user results and feedback. This includes: - Adding a new `testimonials` collection in Firestore. - Implementing frontend components for displaying and submitting testimonials. - Modifying the Gemini service to use the `gemini-3.1-pro-preview` model for enhanced analysis. - Updating the `PlansView` with a new WhatsApp contact number. - Enhancing the `AdminDashboard` to include testimonial creation capabilities.
19 lines
696 B
Plaintext
19 lines
696 B
Plaintext
rules_version = '2';
|
|
|
|
service firebase.storage {
|
|
match /b/{bucket}/o {
|
|
function isSignedIn() { return request.auth != null; }
|
|
function isDbAdmin() {
|
|
return isSignedIn() && firestore.get(/databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin == true;
|
|
}
|
|
|
|
match /testimonials/{userId}/{fileName} {
|
|
allow read: if true;
|
|
allow create, update: if isSignedIn() && (request.auth.uid == userId || isDbAdmin())
|
|
&& request.resource.size < 5 * 1024 * 1024 // 5MB limit
|
|
&& request.resource.contentType.matches('image/.*');
|
|
allow delete: if isSignedIn() && (request.auth.uid == userId || isDbAdmin());
|
|
}
|
|
}
|
|
}
|