Skip to content

Commit

Permalink
Deploy security rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sbutz committed Dec 30, 2023
1 parent 5abb668 commit c9646f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/deploy-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
push:
branches:
- master
#TODO: remove
pull_request:
types:
- opened
- synchronize
- reopend
jobs:
rules_deploy:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions firebase/storage.rules
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c9646f0

Please sign in to comment.