From 2bc9419a210b5c0bd8c5bb951af6e5f085d605fe Mon Sep 17 00:00:00 2001 From: Stefan Butz Date: Sat, 30 Dec 2023 15:51:11 +0700 Subject: [PATCH] Deploy security rules --- firebase/package.json | 2 +- firebase/storage.rules | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/firebase/package.json b/firebase/package.json index e9a16e2..191715f 100644 --- a/firebase/package.json +++ b/firebase/package.json @@ -6,7 +6,7 @@ "author": "", "license": "ISC", "scripts": { - "deploy": "npx firebase-tools deploy --only 'firestore:rules,storage:rules'", + "deploy": "npx firebase-tools deploy --only 'firestore,storage'", "test": "npx firebase-tools emulators:exec --only 'firestore,storage' 'jest -i'", "export": "npx firebase-tools emulators:export ./emulator_data", "lint": "eslint src" diff --git a/firebase/storage.rules b/firebase/storage.rules index e4f1e28..d061515 100644 --- a/firebase/storage.rules +++ b/firebase/storage.rules @@ -14,10 +14,6 @@ service firebase.storage { return isClubMember(clubId) && request.auth.token.admin == true; } - function isTableAdmin(clubId, tableId) { - return isClubMember(clubId) && request.auth.token.tableId == tableId; - } - match /clubs/{clubId}/{image} { function canUpdate() { return image in ['logo.jpeg'].toSet()