diff --git a/.github/workflows/deploy-on-merge.yml b/.github/workflows/deploy-on-merge.yml index 47637da..d8fce1a 100644 --- a/.github/workflows/deploy-on-merge.yml +++ b/.github/workflows/deploy-on-merge.yml @@ -6,6 +6,12 @@ on: push: branches: - master + #TODO: remove + pull_request: + types: + - opened + - synchronize + - reopend jobs: rules_deploy: runs-on: ubuntu-latest 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()