feat(security & backup): double guard permissions in app, restrict news creation to admin, and add one-click firestore backup tool
Build Android APK / Build Release APKs (push) Successful in 12m58s

This commit is contained in:
2026-09-14 11:47:58 +02:00
parent fb91666402
commit 16801d39c6
5 changed files with 107 additions and 7 deletions
+4 -2
View File
@@ -34,8 +34,10 @@ service cloud.firestore {
// Jeder darf News, Mängel & Ideen öffentlich lesen
allow read: if collection in ['News', 'Issues', 'CitizensForum'];
// Erstellen darf jeder freigeschaltete/angemeldete Nutzer
allow create: if isAuthenticated() && collection in ['News', 'Issues', 'CitizensForum'];
// Erstellen: News nur Admin; Mängel und Ideen für angemeldete Nutzer
allow create: if collection == 'News'
? isAdmin()
: (isAuthenticated() && collection in ['Issues', 'CitizensForum']);
// Ändern/Löschen nur der eigene Autor oder Admin
allow update, delete: if isAuthorOrAdmin() && collection in ['News', 'Issues', 'CitizensForum'];