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
Build Android APK / Build Release APKs (push) Successful in 12m58s
This commit is contained in:
+4
-2
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user