diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 80730e8b22..3d5ce5a21c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -16,6 +16,7 @@ apps/desktop/src/auth @bitwarden/team-auth-dev apps/web/src/auth @bitwarden/team-auth-dev # web connectors used for auth apps/web/src/connectors @bitwarden/team-auth-dev +bitwarden_license/bit-web/src/app/auth @bitwarden/team-auth-dev libs/angular/src/auth @bitwarden/team-auth-dev libs/common/src/auth @bitwarden/team-auth-dev @@ -68,8 +69,8 @@ apps/web/src/app/core @bitwarden/team-platform-dev apps/web/src/app/shared @bitwarden/team-platform-dev apps/web/src/translation-constants.ts @bitwarden/team-platform-dev -## Client Integrations team files ## -apps/browser/src/autofill @bitwarden/team-client-integrations-dev +## Autofill team files ## +apps/browser/src/autofill @bitwarden/team-autofill-dev ## Component Library ## libs/components @bitwarden/team-platform-dev @@ -78,8 +79,26 @@ libs/components @bitwarden/team-platform-dev apps/desktop/desktop_native @bitwarden/team-platform-dev ## Multiple file owners ## +apps/browser/package.json +apps/browser/src/manifest.json +apps/browser/src/manifest.v3.json + +apps/cli/package.json + +apps/desktop/package.json +apps/desktop/src/package-lock.json +apps/desktop/src/package.json + /apps/web/config /apps/web/package.json +package-lock.json + +## Locales ## +apps/browser/src/_locales/en/messages.json +apps/cli/src/locales/en/messages.json +apps/desktop/src/locales/en/messages.json +apps/web/src/locales/en/messages.json + ## DevOps team files ## /.github/workflows @bitwarden/dept-devops diff --git a/.github/workflows/brew-bump-cli.yml b/.github/workflows/brew-bump-cli.yml index 8c86b763e8..438e74c942 100644 --- a/.github/workflows/brew-bump-cli.yml +++ b/.github/workflows/brew-bump-cli.yml @@ -23,7 +23,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "brew-bump-workflow-pat" diff --git a/.github/workflows/brew-bump-desktop.yml b/.github/workflows/brew-bump-desktop.yml index b7bb726722..b724f3562a 100644 --- a/.github/workflows/brew-bump-desktop.yml +++ b/.github/workflows/brew-bump-desktop.yml @@ -23,7 +23,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "brew-bump-workflow-pat" diff --git a/.github/workflows/build-browser.yml b/.github/workflows/build-browser.yml index a8836cf5aa..7c4a7f203a 100644 --- a/.github/workflows/build-browser.yml +++ b/.github/workflows/build-browser.yml @@ -354,7 +354,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "crowdin-api-token" @@ -416,7 +416,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets if: failure() - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "devops-alerts-slack-webhook-url" diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index 86a781ab37..b0cc27e0ea 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -404,7 +404,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets if: failure() - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "devops-alerts-slack-webhook-url" diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index 8ffa3f1dc1..60949f3d69 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -277,7 +277,7 @@ jobs: node-gyp install $(node -v) - name: Install AST - uses: bitwarden/gh-actions/install-ast@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/install-ast@a30e9c3d658dc97c4c2e61ec749fdab64b83386c - name: Set up environmentF run: choco install checksum --no-progress @@ -302,7 +302,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "code-signing-vault-url, @@ -1190,7 +1190,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "crowdin-api-token" @@ -1269,7 +1269,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets if: failure() - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "devops-alerts-slack-webhook-url" diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml index 3efbc7807a..9c670f01c6 100644 --- a/.github/workflows/build-web.yml +++ b/.github/workflows/build-web.yml @@ -237,7 +237,7 @@ jobs: - name: Retrieve github PAT secrets id: retrieve-secret-pat - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "github-pat-bitwarden-devops-bot-repo-scope" @@ -245,7 +245,7 @@ jobs: - name: Setup DCT if: ${{ env.is_publish_branch == 'true' }} id: setup-dct - uses: bitwarden/gh-actions/setup-docker-trust@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/setup-docker-trust@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: azure-creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} azure-keyvault-name: "bitwarden-ci" @@ -293,7 +293,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "crowdin-api-token" @@ -354,7 +354,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets if: failure() - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "devops-alerts-slack-webhook-url" diff --git a/.github/workflows/crowdin-pull.yml b/.github/workflows/crowdin-pull.yml index a6441f5c26..28498461d3 100644 --- a/.github/workflows/crowdin-pull.yml +++ b/.github/workflows/crowdin-pull.yml @@ -32,7 +32,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "crowdin-api-token, github-gpg-private-key, github-gpg-private-key-passphrase" diff --git a/.github/workflows/deploy-eu-prod-web.yml b/.github/workflows/deploy-eu-prod-web.yml index 8d9c649348..d2cadd295b 100644 --- a/.github/workflows/deploy-eu-prod-web.yml +++ b/.github/workflows/deploy-eu-prod-web.yml @@ -24,13 +24,13 @@ jobs: - name: Retrieve Storage Account connection string id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: webvault-westeurope-prod secrets: "sa-bitwarden-web-vault-dev-key-temp" - name: Download latest cloud asset - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-web.yml path: apps/web diff --git a/.github/workflows/deploy-eu-qa-web.yml b/.github/workflows/deploy-eu-qa-web.yml index bd87263afa..a5b161e5da 100644 --- a/.github/workflows/deploy-eu-qa-web.yml +++ b/.github/workflows/deploy-eu-qa-web.yml @@ -24,13 +24,13 @@ jobs: - name: Retrieve Storage Account connection string id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: webvaulteu-westeurope-qa secrets: "sa-bitwarden-web-vault-dev-key-temp" - name: Download latest cloud asset - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-web.yml path: apps/web diff --git a/.github/workflows/deploy-non-prod-web.yml b/.github/workflows/deploy-non-prod-web.yml index 70ba715d0d..512fefb534 100644 --- a/.github/workflows/deploy-non-prod-web.yml +++ b/.github/workflows/deploy-non-prod-web.yml @@ -7,12 +7,17 @@ on: inputs: environment: description: 'Environment' - required: true default: 'QA' type: choice options: - QA + workflow_call: + inputs: + environment: + description: 'Environment' + default: 'QA' + type: string jobs: setup: @@ -62,7 +67,7 @@ jobs: uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Download latest cloud asset - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-web.yml path: apps/web diff --git a/.github/workflows/release-browser.yml b/.github/workflows/release-browser.yml index a124688878..11447afa7d 100644 --- a/.github/workflows/release-browser.yml +++ b/.github/workflows/release-browser.yml @@ -41,7 +41,7 @@ jobs: - name: Check Release Version id: version - uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/release-version-check@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: release-type: ${{ github.event.inputs.release_type }} project-type: ts @@ -103,7 +103,7 @@ jobs: - name: Download latest Release build artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-browser.yml workflow_conclusion: success @@ -116,7 +116,7 @@ jobs: - name: Dry Run - Download latest master build artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-browser.yml workflow_conclusion: success diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index cfaaec26ca..1bd1cb6a5c 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -57,7 +57,7 @@ jobs: - name: Check Release Version id: version - uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/release-version-check@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: release-type: ${{ github.event.inputs.release_type }} project-type: ts @@ -78,7 +78,7 @@ jobs: - name: Download all Release artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-cli.yml path: apps/cli @@ -87,7 +87,7 @@ jobs: - name: Dry Run - Download all artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-cli.yml path: apps/cli @@ -150,19 +150,19 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "snapcraft-store-token" - name: Install Snap - uses: samuelmeuli/action-snapcraft@10d7d0a84d9d86098b19f872257df314b0bd8e2d # v1.2.0 + uses: samuelmeuli/action-snapcraft@d33c176a9b784876d966f80fb1b461808edc0641 # v2.1.1 with: snapcraft_token: ${{ steps.retrieve-secrets.outputs.snapcraft-store-token }} - name: Download artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-cli.yml path: apps/cli @@ -172,7 +172,7 @@ jobs: - name: Dry Run - Download artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-cli.yml path: apps/cli @@ -204,7 +204,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "cli-choco-api-key" @@ -220,7 +220,7 @@ jobs: - name: Download artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-cli.yml path: apps/cli/dist @@ -230,7 +230,7 @@ jobs: - name: Dry Run - Download artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-cli.yml path: apps/cli/dist @@ -263,14 +263,14 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "npm-api-key" - name: Download artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-cli.yml path: apps/cli/build @@ -280,7 +280,7 @@ jobs: - name: Dry Run - Download artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-cli.yml path: apps/cli/build diff --git a/.github/workflows/release-desktop-beta.yml b/.github/workflows/release-desktop-beta.yml index 509e8a0baf..cf2ab64a56 100644 --- a/.github/workflows/release-desktop-beta.yml +++ b/.github/workflows/release-desktop-beta.yml @@ -47,7 +47,7 @@ jobs: - name: Check Release Version id: version - uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/release-version-check@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: release-type: 'Initial Release' project-type: ts @@ -231,7 +231,7 @@ jobs: node-gyp install $(node -v) - name: Install AST - uses: bitwarden/gh-actions/install-ast@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/install-ast@a30e9c3d658dc97c4c2e61ec749fdab64b83386c - name: Set up environment run: choco install checksum --no-progress @@ -249,7 +249,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "code-signing-vault-url, @@ -932,7 +932,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "aws-electron-access-id, diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index 265d502530..2dc8bb3b31 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -67,7 +67,7 @@ jobs: - name: Check Release Version id: version - uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/release-version-check@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: release-type: ${{ github.event.inputs.release_type }} project-type: ts @@ -110,7 +110,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "aws-electron-access-id, @@ -123,7 +123,7 @@ jobs: - name: Download all artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-desktop.yml workflow_conclusion: success @@ -132,7 +132,7 @@ jobs: - name: Dry Run - Download all artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-desktop.yml workflow_conclusion: success @@ -185,7 +185,7 @@ jobs: --endpoint-url https://${CF_ACCOUNT}.r2.cloudflarestorage.com - name: Get checksum files - uses: bitwarden/gh-actions/get-checksum@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-checksum@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: packages_dir: "apps/desktop/artifacts" file_path: "apps/desktop/artifacts/sha256-checksums.txt" @@ -263,7 +263,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "snapcraft-store-token" @@ -279,7 +279,7 @@ jobs: - name: Download Snap artifact if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-desktop.yml workflow_conclusion: success @@ -289,7 +289,7 @@ jobs: - name: Dry Run - Download Snap artifact if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-desktop.yml workflow_conclusion: success @@ -329,7 +329,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "cli-choco-api-key" @@ -347,7 +347,7 @@ jobs: - name: Download choco artifact if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-desktop.yml workflow_conclusion: success @@ -357,7 +357,7 @@ jobs: - name: Dry Run - Download choco artifact if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-desktop.yml workflow_conclusion: success diff --git a/.github/workflows/release-qa-web.yml b/.github/workflows/release-qa-web.yml deleted file mode 100644 index fa904f396f..0000000000 --- a/.github/workflows/release-qa-web.yml +++ /dev/null @@ -1,84 +0,0 @@ ---- -name: QA - Web Release - -on: - workflow_dispatch: {} - -jobs: - cfpages-deploy: - name: Deploy Web Vault to QA CloudFlare Pages branch - runs-on: ubuntu-20.04 - steps: - - name: Create GitHub deployment - uses: chrnorm/deployment-action@d42cde7132fcec920de534fffc3be83794335c00 # v2.0.5 - id: deployment - with: - token: '${{ secrets.GITHUB_TOKEN }}' - initial-status: 'in_progress' - environment-url: http://vault.qa.bitwarden.pw - environment: 'Web Vault - QA' - description: 'Deployment from branch ${{ github.ref_name }}' - - - name: Checkout Repo - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - - name: Download latest cloud asset - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 - with: - workflow: build-web.yml - path: apps/web - workflow_conclusion: success - branch: ${{ github.ref_name }} - artifacts: web-*-cloud-QA.zip - - - name: Unzip cloud asset - working-directory: apps/web - run: unzip web-*-cloud-QA.zip - - - name: Checkout Repo - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: cf-pages-qa - path: deployment - - - name: Setup git config - run: | - git config --global user.name "GitHub Action Bot" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --global url."https://github.com/".insteadOf ssh://git@github.com/ - git config --global url."https://".insteadOf ssh:// - - - name: Deploy CloudFlare Pages - run: | - rm -rf ./* - cp -R ../apps/web/build/* . - working-directory: deployment - - - name: Push new ver to cf-pages-qa - run: | - if [ -n "$(git status --porcelain)" ]; then - git add . - git commit -m "Deploy ${{ github.ref_name }} to QA Cloudflare pages" - git push -u origin cf-pages-qa - else - echo "No changes to commit!"; - fi - working-directory: deployment - - - name: Update deployment status to Success - if: ${{ success() }} - uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 # v2.0.1 - with: - token: '${{ secrets.GITHUB_TOKEN }}' - environment-url: http://vault.qa.bitwarden.pw - state: 'success' - deployment-id: ${{ steps.deployment.outputs.deployment_id }} - - - name: Update deployment status to Failure - if: ${{ failure() }} - uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 # v2.0.1 - with: - token: '${{ secrets.GITHUB_TOKEN }}' - environment-url: http://vault.qa.bitwarden.pw - state: 'failure' - deployment-id: ${{ steps.deployment.outputs.deployment_id }} diff --git a/.github/workflows/release-web.yml b/.github/workflows/release-web.yml index ec55daee5c..601d788449 100644 --- a/.github/workflows/release-web.yml +++ b/.github/workflows/release-web.yml @@ -38,7 +38,7 @@ jobs: - name: Check Release Version id: version - uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/release-version-check@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: release-type: ${{ github.event.inputs.release_type }} project-type: ts @@ -70,7 +70,7 @@ jobs: ########## DockerHub ########## - name: Setup DCT id: setup-dct - uses: bitwarden/gh-actions/setup-docker-trust@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/setup-docker-trust@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: azure-creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} azure-keyvault-name: "bitwarden-ci" @@ -156,7 +156,7 @@ jobs: - name: Retrieve bot secrets id: retrieve-bot-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: bitwarden-ci secrets: "github-pat-bitwarden-devops-bot-repo-scope" @@ -170,7 +170,7 @@ jobs: - name: Download latest cloud asset if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-web.yml path: assets @@ -180,7 +180,7 @@ jobs: - name: Dry Run - Download latest cloud asset if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-web.yml path: assets @@ -253,7 +253,7 @@ jobs: - name: Download latest build artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-web.yml path: apps/web/artifacts @@ -264,7 +264,7 @@ jobs: - name: Dry Run - Download latest build artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/download-artifacts@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: workflow: build-web.yml path: apps/web/artifacts diff --git a/.github/workflows/staged-rollout-desktop.yml b/.github/workflows/staged-rollout-desktop.yml index a21413dcc6..477192b505 100644 --- a/.github/workflows/staged-rollout-desktop.yml +++ b/.github/workflows/staged-rollout-desktop.yml @@ -26,7 +26,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "aws-electron-access-id, diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 85df8a635b..55363a329e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ defaults: jobs: test: name: Run tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout repo uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -72,6 +72,9 @@ jobs: - windows-latest steps: + - name: Rust version check + run: rustup --version + - name: Install gnome-keyring if: ${{ matrix.os=='ubuntu-latest' }} run: | @@ -81,13 +84,6 @@ jobs: - name: Checkout repo uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Install rust - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 - with: - toolchain: stable - profile: minimal - override: true - - name: Build working-directory: ./apps/desktop/desktop_native run: cargo build diff --git a/.github/workflows/version-auto-bump.yml b/.github/workflows/version-auto-bump.yml index acb91a4db0..2c13ec05b3 100644 --- a/.github/workflows/version-auto-bump.yml +++ b/.github/workflows/version-auto-bump.yml @@ -39,15 +39,11 @@ jobs: echo "new-version=$NEW_VER" >> $GITHUB_OUTPUT trigger_version_bump: - name: "Trigger desktop version bump workflow" - runs-on: ubuntu-22.04 - needs: - - setup - steps: - - name: Bump version to ${{ needs.setup.outputs.version_number }} - uses: ./.github/workflows/version-bump.yml - secrets: - AZURE_PROD_KV_CREDENTIALS: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} - with: - version_number: ${{ needs.setup.outputs.version_number }} - client: "Desktop" + name: Bump version to ${{ needs.setup.outputs.version_number }} + needs: setup + uses: ./.github/workflows/version-bump.yml + secrets: + AZURE_PROD_KV_CREDENTIALS: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} + with: + version_number: ${{ needs.setup.outputs.version_number }} + client: "Desktop" diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 7937c34d14..f30a935c4b 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -49,7 +49,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/get-keyvault-secrets@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: keyvault: "bitwarden-ci" secrets: "github-gpg-private-key, github-gpg-private-key-passphrase" @@ -86,14 +86,14 @@ jobs: - name: Bump Browser Version - Manifest if: ${{ github.event.inputs.client == 'Browser' || github.event.inputs.client == 'All' }} - uses: bitwarden/gh-actions/version-bump@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/version-bump@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: version: ${{ github.event.inputs.version_number }} file_path: "apps/browser/src/manifest.json" - name: Bump Browser Version - Manifest v3 if: ${{ github.event.inputs.client == 'Browser' || github.event.inputs.client == 'All' }} - uses: bitwarden/gh-actions/version-bump@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/version-bump@a30e9c3d658dc97c4c2e61ec749fdab64b83386c with: version: ${{ github.event.inputs.version_number }} file_path: "apps/browser/src/manifest.v3.json" diff --git a/.github/workflows/workflow-linter.yml b/.github/workflows/workflow-linter.yml index 9fe167ad72..9dced5ee53 100644 --- a/.github/workflows/workflow-linter.yml +++ b/.github/workflows/workflow-linter.yml @@ -8,4 +8,4 @@ on: jobs: call-workflow: - uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@37ffa14164a7308bc273829edfe75c97cd562375 + uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@a30e9c3d658dc97c4c2e61ec749fdab64b83386c diff --git a/apps/browser/package.json b/apps/browser/package.json index 7eb29bcc05..16ef13a448 100644 --- a/apps/browser/package.json +++ b/apps/browser/package.json @@ -1,6 +1,6 @@ { "name": "@bitwarden/browser", - "version": "2023.5.1", + "version": "2023.7.0", "scripts": { "build": "webpack", "build:mv3": "cross-env MANIFEST_VERSION=3 webpack", diff --git a/apps/browser/src/manifest.json b/apps/browser/src/manifest.json index e969f2924a..be865f163c 100644 --- a/apps/browser/src/manifest.json +++ b/apps/browser/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_extName__", "short_name": "__MSG_appName__", - "version": "2023.5.1", + "version": "2023.7.0", "description": "__MSG_extDesc__", "default_locale": "en", "author": "Bitwarden Inc.", diff --git a/apps/browser/src/manifest.v3.json b/apps/browser/src/manifest.v3.json index face29b7da..4059822f62 100644 --- a/apps/browser/src/manifest.v3.json +++ b/apps/browser/src/manifest.v3.json @@ -3,7 +3,7 @@ "minimum_chrome_version": "102.0", "name": "__MSG_extName__", "short_name": "__MSG_appName__", - "version": "2023.5.1", + "version": "2023.7.0", "description": "__MSG_extDesc__", "default_locale": "en", "author": "Bitwarden Inc.", diff --git a/apps/cli/package.json b/apps/cli/package.json index d6577a9f33..7c6e50e22a 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -1,7 +1,7 @@ { "name": "@bitwarden/cli", "description": "A secure and free password manager for all of your devices.", - "version": "2023.5.0", + "version": "2023.7.0", "keywords": [ "bitwarden", "password", diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 2bc4430dbb..fa2ba4c22d 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,7 +1,7 @@ { "name": "@bitwarden/desktop", "description": "A secure and free password manager for all of your devices.", - "version": "2023.5.2", + "version": "2023.7.0", "keywords": [ "bitwarden", "password", diff --git a/apps/desktop/src/auth/login/login-with-device.component.html b/apps/desktop/src/auth/login/login-with-device.component.html index a1fcb42400..29fb103494 100644 --- a/apps/desktop/src/auth/login/login-with-device.component.html +++ b/apps/desktop/src/auth/login/login-with-device.component.html @@ -1,16 +1,4 @@
-
- -
Bitwarden

{{ "logInInitiated" | i18n }}

diff --git a/apps/desktop/src/package-lock.json b/apps/desktop/src/package-lock.json index b50d2f3b11..14375793fb 100644 --- a/apps/desktop/src/package-lock.json +++ b/apps/desktop/src/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bitwarden/desktop", - "version": "2023.5.2", + "version": "2023.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@bitwarden/desktop", - "version": "2023.5.2", + "version": "2023.7.0", "license": "GPL-3.0", "dependencies": { "@bitwarden/desktop-native": "file:../desktop_native" diff --git a/apps/desktop/src/package.json b/apps/desktop/src/package.json index e35afad0e3..a21f4237a3 100644 --- a/apps/desktop/src/package.json +++ b/apps/desktop/src/package.json @@ -2,7 +2,7 @@ "name": "@bitwarden/desktop", "productName": "Bitwarden", "description": "A secure and free password manager for all of your devices.", - "version": "2023.5.2", + "version": "2023.7.0", "author": "Bitwarden Inc. (https://bitwarden.com)", "homepage": "https://bitwarden.com", "license": "GPL-3.0", diff --git a/apps/desktop/src/scss/pages.scss b/apps/desktop/src/scss/pages.scss index 8e38cbd7db..fda75e834f 100644 --- a/apps/desktop/src/scss/pages.scss +++ b/apps/desktop/src/scss/pages.scss @@ -225,6 +225,7 @@ #login-with-device-page { .content { display: block; + padding-top: 70px; width: 350px !important; .fingerprint { diff --git a/apps/web/package.json b/apps/web/package.json index 4be9ecc941..e2ec49d732 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@bitwarden/web-vault", - "version": "2023.5.1", + "version": "2023.7.0", "scripts": { "build:oss": "webpack", "build:bit": "webpack -c ../../bitwarden_license/bit-web/webpack.config.js", diff --git a/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts b/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts index df436e687e..f52115c268 100644 --- a/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts @@ -9,7 +9,6 @@ import { OrganizationService } from "@bitwarden/common/admin-console/abstraction import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Verification } from "@bitwarden/common/types/verification"; @@ -36,10 +35,13 @@ class CountBasedLocalizationKey { class OrganizationContentSummaryItem { count: number; + get localizationKey(): string { return this.localizationKeyOptions.getKey(this.count); } + private localizationKeyOptions: CountBasedLocalizationKey; + constructor(count: number, localizationKeyOptions: CountBasedLocalizationKey) { this.count = count; this.localizationKeyOptions = localizationKeyOptions; @@ -88,7 +90,6 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy { private i18nService: I18nService, private platformUtilsService: PlatformUtilsService, private userVerificationService: UserVerificationService, - private logService: LogService, private cipherService: CipherService, private organizationService: OrganizationService, private organizationApiService: OrganizationApiServiceAbstraction, @@ -116,20 +117,16 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy { } protected submit = async () => { - try { - this.formPromise = this.userVerificationService - .buildRequest(this.formGroup.value.secret) - .then((request) => this.organizationApiService.delete(this.organization.id, request)); - await this.formPromise; - this.platformUtilsService.showToast( - "success", - this.i18nService.t("organizationDeleted"), - this.i18nService.t("organizationDeletedDesc") - ); - this.dialogRef.close(DeleteOrganizationDialogResult.Deleted); - } catch (e) { - this.logService.error(e); - } + await this.userVerificationService + .buildRequest(this.formGroup.value.secret) + .then((request) => this.organizationApiService.delete(this.organization.id, request)); + + this.platformUtilsService.showToast( + "success", + this.i18nService.t("organizationDeleted"), + this.i18nService.t("organizationDeletedDesc") + ); + this.dialogRef.close(DeleteOrganizationDialogResult.Deleted); }; private buildOrganizationContentSummary(ciphers: CipherView[]): OrganizationContentSummary { diff --git a/apps/web/src/app/auth/login/login-with-device.component.html b/apps/web/src/app/auth/login/login-with-device.component.html index feb6fc10e8..f190f8f5c6 100644 --- a/apps/web/src/app/auth/login/login-with-device.component.html +++ b/apps/web/src/app/auth/login/login-with-device.component.html @@ -38,7 +38,7 @@
- {{ "loginWithDeviceEnabledInfo" | i18n }} + {{ "loginWithDeviceEnabledNote" | i18n }} {{ "viewAllLoginOptions" | i18n }}
diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index c672b24468..f95cdb1b29 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -619,8 +619,8 @@ "loginWithDevice": { "message": "Log in with device" }, - "loginWithDeviceEnabledInfo": { - "message": "Log in with device must be set up in the settings of the Bitwarden mobile app. Need another option?" + "loginWithDeviceEnabledNote": { + "message": "Log in with device must be set up in the settings of the Bitwarden app. Need another option?" }, "loginWithMasterPassword": { "message": "Log in with master password" diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts index 3ff6ad760e..1d79ae0685 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts @@ -28,6 +28,7 @@ export class ServiceAccountsListComponent implements OnDestroy { @Input() set search(search: string) { + this.selection.clear(); this.dataSource.filter = search; } @@ -55,15 +56,20 @@ export class ServiceAccountsListComponent implements OnDestroy { } isAllSelected() { - const numSelected = this.selection.selected.length; - const numRows = this.serviceAccounts.length; - return numSelected === numRows; + if (this.selection.selected?.length > 0) { + const numSelected = this.selection.selected.length; + const numRows = this.dataSource.filteredData.length; + return numSelected === numRows; + } + return false; } toggleAll() { - this.isAllSelected() - ? this.selection.clear() - : this.selection.select(...this.serviceAccounts.map((s) => s.id)); + if (this.isAllSelected()) { + this.selection.clear(); + } else { + this.selection.select(...this.dataSource.filteredData.map((s) => s.id)); + } } delete(serviceAccount: ServiceAccountView) { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts index 2c4836934d..426af07591 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts @@ -26,6 +26,7 @@ export class ProjectsListComponent { @Input() set search(search: string) { + this.selection.clear(); this.dataSource.filter = search; } @@ -45,15 +46,20 @@ export class ProjectsListComponent { ) {} isAllSelected() { - const numSelected = this.selection.selected.length; - const numRows = this.projects.length; - return numSelected === numRows; + if (this.selection.selected?.length > 0) { + const numSelected = this.selection.selected.length; + const numRows = this.dataSource.filteredData.length; + return numSelected === numRows; + } + return false; } toggleAll() { - this.isAllSelected() - ? this.selection.clear() - : this.selection.select(...this.projects.map((s) => s.id)); + if (this.isAllSelected()) { + this.selection.clear(); + } else { + this.selection.select(...this.dataSource.filteredData.map((s) => s.id)); + } } deleteProject(projectId: string) { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts index 301a4f9c2a..59a99bb1e3 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts @@ -29,6 +29,7 @@ export class SecretsListComponent implements OnDestroy { @Input() set search(search: string) { + this.selection.clear(); this.dataSource.filter = search; } @@ -61,15 +62,20 @@ export class SecretsListComponent implements OnDestroy { } isAllSelected() { - const numSelected = this.selection.selected.length; - const numRows = this.secrets.length; - return numSelected === numRows; + if (this.selection.selected?.length > 0) { + const numSelected = this.selection.selected.length; + const numRows = this.dataSource.filteredData.length; + return numSelected === numRows; + } + return false; } toggleAll() { - this.isAllSelected() - ? this.selection.clear() - : this.selection.select(...this.secrets.map((s) => s.id)); + if (this.isAllSelected()) { + this.selection.clear(); + } else { + this.selection.select(...this.dataSource.filteredData.map((s) => s.id)); + } } bulkDeleteSecrets() { diff --git a/libs/common/src/platform/services/environment.service.ts b/libs/common/src/platform/services/environment.service.ts index 188c633a03..7b48c9d6eb 100644 --- a/libs/common/src/platform/services/environment.service.ts +++ b/libs/common/src/platform/services/environment.service.ts @@ -286,19 +286,19 @@ export class EnvironmentService implements EnvironmentServiceAbstraction { async setRegion(region: Region) { this.selectedRegion = region; await this.stateService.setRegion(region); - switch (region) { - case Region.EU: + if (region === Region.SelfHosted) { + // If user saves a self-hosted region with empty fields, default to US + if (this.isEmpty()) { + await this.setRegion(Region.US); + } + } else { + // If we are setting the region to EU or US, clear the self-hosted URLs + this.stateService.setEnvironmentUrls(new EnvironmentUrls()); + if (region === Region.EU) { this.setUrlsInternal(this.euUrls); - break; - case Region.US: + } else if (region === Region.US) { this.setUrlsInternal(this.usUrls); - break; - case Region.SelfHosted: - // if user saves with empty fields, default to US - if (this.isEmpty()) { - await this.setRegion(Region.US); - } - break; + } } } diff --git a/libs/common/src/platform/services/state.service.ts b/libs/common/src/platform/services/state.service.ts index 9822b6d967..50ac5668f0 100644 --- a/libs/common/src/platform/services/state.service.ts +++ b/libs/common/src/platform/services/state.service.ts @@ -188,7 +188,7 @@ export class StateService< } async addAccount(account: TAccount) { - account = await this.setAccountEnvironmentUrls(account); + account = await this.setAccountEnvironment(account); await this.updateState(async (state) => { state.authenticatedAccounts.push(account.profile.userId); await this.storageService.save(keys.authenticatedAccounts, state.authenticatedAccounts); @@ -2908,8 +2908,9 @@ export class StateService< await this.defaultOnDiskLocalOptions() ) ); - // EnvironmentUrls are set before authenticating and should override whatever is stored from any previous session + // EnvironmentUrls and region are set before authenticating and should override whatever is stored from any previous session const environmentUrls = account.settings.environmentUrls; + const region = account.settings.region; if (storedAccount?.settings != null) { account.settings = storedAccount.settings; } else if (await this.storageService.has(keys.tempAccountSettings)) { @@ -2917,6 +2918,8 @@ export class StateService< await this.storageService.remove(keys.tempAccountSettings); } account.settings.environmentUrls = environmentUrls; + account.settings.region = region; + if ( account.settings.vaultTimeoutAction === VaultTimeoutAction.LogOut && account.settings.vaultTimeout != null @@ -2944,6 +2947,7 @@ export class StateService< ); if (storedAccount?.settings != null) { storedAccount.settings.environmentUrls = account.settings.environmentUrls; + storedAccount.settings.region = account.settings.region; account.settings = storedAccount.settings; } await this.storageService.save( @@ -2966,6 +2970,7 @@ export class StateService< ); if (storedAccount?.settings != null) { storedAccount.settings.environmentUrls = account.settings.environmentUrls; + storedAccount.settings.region = account.settings.region; account.settings = storedAccount.settings; } await this.storageService.save( @@ -3116,7 +3121,9 @@ export class StateService< return Object.assign(this.createAccount(), persistentAccountInformation); } - protected async setAccountEnvironmentUrls(account: TAccount): Promise { + // The environment urls and region are selected before login and are transferred here to an authenticated account + protected async setAccountEnvironment(account: TAccount): Promise { + account.settings.region = await this.getGlobalRegion(); account.settings.environmentUrls = await this.getGlobalEnvironmentUrls(); return account; } @@ -3126,6 +3133,11 @@ export class StateService< return (await this.getGlobals(options)).environmentUrls ?? new EnvironmentUrls(); } + protected async getGlobalRegion(options?: StorageOptions): Promise { + options = this.reconcileOptions(options, await this.defaultOnDiskOptions()); + return (await this.getGlobals(options)).region ?? null; + } + protected async clearDecryptedDataForActiveUser(): Promise { await this.updateState(async (state) => { const userId = state?.activeUserId; diff --git a/libs/components/src/table/table-data-source.ts b/libs/components/src/table/table-data-source.ts index 71e8b8318e..9565d48d00 100644 --- a/libs/components/src/table/table-data-source.ts +++ b/libs/components/src/table/table-data-source.ts @@ -17,9 +17,16 @@ export class TableDataSource extends DataSource { private readonly _sort: BehaviorSubject; private readonly _filter = new BehaviorSubject(""); private readonly _renderData = new BehaviorSubject([]); - private _renderChangesSubscription: Subscription | null = null; + /** + * The filtered set of data that has been matched by the filter string, or all the data if there + * is no filter. Useful for knowing the set of data the table represents. + * For example, a 'selectAll()' function would likely want to select the set of filtered data + * shown to the user rather than all the data. + */ + filteredData: T[]; + constructor() { super(); this._data = new BehaviorSubject([]); @@ -31,7 +38,13 @@ export class TableDataSource extends DataSource { } set data(data: T[]) { - this._data.next(data ? [...data] : []); + data = Array.isArray(data) ? data : []; + this._data.next(data); + // Normally the `filteredData` is updated by the re-render + // subscription, but that won't happen if it's inactive. + if (!this._renderChangesSubscription) { + this.filterData(data); + } } set sort(sort: Sort) { @@ -48,6 +61,11 @@ export class TableDataSource extends DataSource { set filter(filter: string) { this._filter.next(filter); + // Normally the `filteredData` is updated by the re-render + // subscription, but that won't happen if it's inactive. + if (!this._renderChangesSubscription) { + this.filterData(this.data); + } } connect(): Observable { @@ -65,7 +83,7 @@ export class TableDataSource extends DataSource { private updateChangeSubscription() { const filteredData = combineLatest([this._data, this._filter]).pipe( - map(([data, filter]) => this.filterData(data, filter)) + map(([data]) => this.filterData(data)) ); const orderedData = combineLatest([filteredData, this._sort]).pipe( @@ -76,12 +94,13 @@ export class TableDataSource extends DataSource { this._renderChangesSubscription = orderedData.subscribe((data) => this._renderData.next(data)); } - private filterData(data: T[], filter: string): T[] { - if (filter == null || filter == "") { - return data; - } + private filterData(data: T[]): T[] { + this.filteredData = + this.filter == null || this.filter === "" + ? data + : data.filter((obj) => this.filterPredicate(obj, this.filter)); - return data.filter((obj) => this.filterPredicate(obj, filter)); + return this.filteredData; } private orderData(data: T[], sort: Sort): T[] { diff --git a/package-lock.json b/package-lock.json index ece9fd9805..e2454a5458 100644 --- a/package-lock.json +++ b/package-lock.json @@ -189,11 +189,11 @@ }, "apps/browser": { "name": "@bitwarden/browser", - "version": "2023.5.1" + "version": "2023.7.0" }, "apps/cli": { "name": "@bitwarden/cli", - "version": "2023.5.0", + "version": "2023.7.0", "license": "GPL-3.0-only", "dependencies": { "@koa/multer": "3.0.2", @@ -229,7 +229,7 @@ }, "apps/desktop": { "name": "@bitwarden/desktop", - "version": "2023.5.2", + "version": "2023.7.0", "hasInstallScript": true, "license": "GPL-3.0" }, @@ -243,7 +243,7 @@ }, "apps/web": { "name": "@bitwarden/web-vault", - "version": "2023.5.1" + "version": "2023.7.0" }, "libs/angular": { "name": "@bitwarden/angular",