feat: Add prayer chains, social sharing, and testimony wall
- Add PrayerChain component for visualizing linked prayers - Add SharePrayer component with social media integration (Twitter, Facebook, WhatsApp, copy link) - Create /testimonies page for public answered prayer stories - Update Firestore rules for public testimony access - Enhance Organization tab with prayer chains - Add Testimonies navigation tab - Fix Firebase Admin SDK integration for server-side operations - Improve email system with proper server-side authentication - Update prayer form to handle optional fields correctly - Deploy updated Firestore security rules
This commit is contained in:
1 parent
7214fdb89a
commit
d9784738e4
32 files changed
+3146
-3236
No files matched your search
+29
-3
@@ -6,8 +6,33 @@ service cloud.firestore {
|
||||
allow read, write: if request.auth != null && request.auth.uid == userId;
|
||||
}
|
||||
|
||||
// Allow authenticated users to read/write their own prayers
|
||||
// Allow public reading of answered prayers for testimony wall
|
||||
match /prayers/{prayerId} {
|
||||
allow read: if resource.data.answered == true;
|
||||
allow read, write: if request.auth != null &&
|
||||
resource.data.userId == request.auth.uid;
|
||||
allow create: if request.auth != null &&
|
||||
request.resource.data.userId == request.auth.uid;
|
||||
}
|
||||
|
||||
// Allow authenticated users to read/write their own prayer templates
|
||||
match /prayerTemplates/{templateId} {
|
||||
allow read, write: if request.auth != null &&
|
||||
resource.data.userId == request.auth.uid;
|
||||
allow create: if request.auth != null &&
|
||||
request.resource.data.userId == request.auth.uid;
|
||||
}
|
||||
|
||||
// Allow authenticated users to read/write their own prayer goals
|
||||
match /prayerGoals/{goalId} {
|
||||
allow read, write: if request.auth != null &&
|
||||
resource.data.userId == request.auth.uid;
|
||||
allow create: if request.auth != null &&
|
||||
request.resource.data.userId == request.auth.uid;
|
||||
}
|
||||
|
||||
// Allow authenticated users to read/write their own email templates
|
||||
match /emailTemplates/{templateId} {
|
||||
allow read, write: if request.auth != null &&
|
||||
resource.data.userId == request.auth.uid;
|
||||
allow create: if request.auth != null &&
|
||||
@@ -24,9 +49,10 @@ service cloud.firestore {
|
||||
allow read: if true;
|
||||
}
|
||||
|
||||
// Allow authenticated users to read/write config (for admin settings)
|
||||
// Allow server-side API access to config (for SMTP settings)
|
||||
match /config/{configId} {
|
||||
allow read, write: if request.auth != null;
|
||||
allow read: if true;
|
||||
allow write: if request.auth != null;
|
||||
}
|
||||
|
||||
// Allow authenticated users to read/write shared prayers
|
||||
|
||||
Reference in new issue
Block a user