1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

2554 Commits

Author SHA1 Message Date
Shane Melton
381f528c53 [PM-22756] Send minimizeOnCopy message during copy on Desktop platform (#15232)
* [PM-22756] Send minimizeOnCopy message during copy on Desktop platform

* [PM-22756] Introduce optional CopyClickListener pattern

* [PM-22756] Introduce CopyService that wraps PlatformUtilsService.copyToClipboard to allow scoped implementations

* [PM-22756] Introduce DesktopVaultCopyService that sends the minimizeOnCopy message

* [PM-22756] Remove leftover onCopy method

* [PM-22756] Fix failing tests

* [PM-22756] Revert CopyService solution

* [PM-22756] Cleanup

* [PM-22756] Update test

* [PM-22756] Cleanup leftover test changes

(cherry picked from commit e8f53fe9b7)
2025-06-18 14:45:00 -07:00
Bryan Cunningham
f76e80f3cd [CL-688] Callout UI updates (#15152)
* refresh callout ui

* fix callout padding

* Use more descriptive example text

* position icon. Change padding back
2025-06-13 14:12:45 -04:00
Jared Snider
bfb0b874ed fix(Multi-Account-Logout: [Auth/PM-19555] Fix multi account logout on lock screens not redirecting properly (#14630)
* PM-19555 - LogoutService - build abstraction, default, and extension service and register with service modules

* PM-19555 - Lock Comp - use logoutService

* PM-19555 - LoginDecryptionOptions - Use logout service which removed need for extension-login-decryption-options.service

* PM-19555 - AccountSwitcher logic update - (1) Use logout service + redirect guard routing (2) Remove logout method from account switcher service (3) use new NewActiveUser type

* PM-19555 - Extension - Acct Switcher comp - clean up TODOs

* PM-19555 - Add TODOs for remaining tech debt

* PM-19555 - Add tests for new logout services.

* PM-19555 - Extension - LoginInitiated - show acct switcher b/c user is AuthN

* PM-19555 - Add TODO to replace LogoutCallback with LogoutService

* PM-19555 WIP

* PM-19555 - Extension App Comp - account switching to account in TDE locked state works now.

* PM-19555 - Extension App Comp - add docs

* PM-19555 - Extension App Comp - add early return

* PM-19555 - Desktop App Comp - add handling for TDE lock case to switch account logic.

* PM-19555 - Extension - Account Component - if account unlocked go to vault

* PM-19555 - Per PR feedback, clean up unnecessary nullish coalescing operator.

* PM-19555 - Extension - AppComponent - fix everHadUserKey merge issue

* PM-19555 - PR feedback - refactor switchAccount and locked message handling on browser & desktop to require user id. I audited all callsites for both to ensure this *shouldn't* error.
2025-06-13 13:22:04 -04:00
SmithThe4th
c6e4a9ba75 Fix mapping issue between client and SDK (#15056) 2025-06-13 10:58:38 -04:00
Vicki League
0e1d48179d [PM-13196] Hide decorative chip select icons from screenreaders (#14990) 2025-06-12 16:27:26 -04:00
Jonathan Prusik
93ab8b7ec1 add optional chaining to possibly nullish orgKeys (#15172) 2025-06-12 20:15:50 +00:00
Anders Åberg
bef6182243 PM-22221: Fix a race condition with cipher creation (#15157)
* PM-22221: Fix a race condition with cipher creation

* Mocked ciphers$ in tests

* Neater tests

---------

Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
2025-06-12 12:53:35 -04:00
Leslie Tilton
6a579ed99f [PM-15001] Replace throttle decorator (#15015)
* Add comments to AuditService Abstraction

* Replace throttle usage with rxjs mergeMap with concurrent limit

* Add test cases for audit service

* Remove throttle
2025-06-12 10:52:04 -05:00
Thomas Avery
381e7fa45e [PM-22563] Add awaiting the SDK to be ready to EncryptService (#15138) 2025-06-12 10:11:44 -05:00
Andreas Coroiu
0e608639cc [PM-20615] Only process incoming messages once (#14645)
* feat: start ipc client

* fix: payload serialization issues

* feat: filter incoming messages by destination

* fix: adapt to SDK renames

* feat: update sdk
2025-06-12 10:17:03 +02:00
Thomas Avery
c52e6a3f2c [PM-22408] Remove setMasterKeyEncryptedUserKey from KeyService (#15087)
* Swap consumers to masterPasswordService.setMasterKeyEncryptedUserKey

* Remove setMasterKeyEncryptedUserKey from keyService

* unit tests
2025-06-11 15:48:18 -05:00
Jordan Aasen
1175da3845 [PM-20642] - [Vault] [Web App] Front End Changes to Enforce "Remove card item type policy" (#15097)
* add restricted item types service and apply it to filter web cipher

* code cleanup. add shareReplay

* account for multiple orgs when restricting item types

* restrict item types for specific orgs

* clean up logic. use policiesByType$

* track by item.type

* clean up filtering. prefer observable. do not exempt owners for restricted item types

* simplify in vault-filter. move item filter logic to vault. fix tests

* don't return early in filter-function
2025-06-11 09:30:12 -07:00
Bryan Cunningham
8b42edf9dc [CL-687] Updated dark mode color variables (#15123)
* updated dark mode color variables

* update light versions to match
2025-06-11 11:54:15 -04:00
Brandon Treston
50cee3cd9a [PM-22099] expose default collection in clients collection service (#15122)
* Add types

* rename types

* fix types

* fix model and tests
2025-06-11 11:39:47 -04:00
Thomas Avery
90b07728d7 [PM-22133] Require userID for clearStoredUserKey (#14973) 2025-06-10 17:28:50 -05:00
Bernd Schoolmann
45605e9752 [PM-21944] Split up userkey rotation v2 and add tests (#14900)
* Split up userkey rotation v2 and add tests

* Fix eslint

* Fix type errors

* Fix tests

* Clear up trusted key naming

* Split up getNewAccountKeys

* Add trim and lowercase

* Replace user.email with masterKeySalt

* Add wasTrustDenied to verifyTrust in key rotation service

* Move testable userkey rotation service code to testable class

* Fix build

* Undo changes

* Fix incorrect behavior on aborting key rotation and fix import

* Fix tests

* Make members of userkey rotation service protected

* Fix type error

* Cleanup and add injectable annotation

* Fix tests

* Update apps/web/src/app/key-management/key-rotation/user-key-rotation.service.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Remove v1 rotation request

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-06-10 15:57:47 +02:00
Rui Tomé
b5bddd0b06 [PM-17154] Limit item deletion feature flag removal (#15094)
* Refactor components to remove limitItemDeletion feature flag usage

This commit simplifies the logic in various components by removing the limitItemDeletion feature flag. The conditions for displaying restore and delete actions are now based solely on the cipher's permissions, enhancing code clarity and maintainability.

* Refactor cipher deletion logic to remove the feature flag and collection ID dependency

This commit updates the cipher deletion logic across multiple components and services by removing the unnecessary dependency on collection IDs. The `canDeleteCipher$` method now solely relies on the cipher's permissions, simplifying the code and improving maintainability.

* Remove LimitItemDeletion feature flag from feature-flag enum and default values

* Remove configService from ServiceContainer and MainBackground constructor parameters

* Remove configService from RestoreCommand instantiation in OssServeConfigurator and VaultProgram classes
2025-06-10 09:57:34 +01:00
Bernd Schoolmann
a368b70ab5 [BEEEP] Remove legacy biometrics protocol (#15004)
* Remove legacy biometrics protocol

* Remove legacy message handling on desktop
2025-06-10 05:25:12 +02:00
Justin Baur
b1f090e054 Add lang attr on desktop and browser (#14691) 2025-06-09 06:54:00 -04:00
Thomas Avery
9d743a7ee0 [PM-21705] Require userID for refreshAdditionalKeys() on key-service (#14810)
* Require userID for refreshAdditionalKeys()

* Add error handling to desktop Unlock settings

* Add more unit test coverage
2025-06-06 13:38:25 -05:00
Bryan Cunningham
3e4c37b8b3 [CL-194] add vertical stepper to CL (#14528)
* Copy Vertical stepper into CL

* remove unused input

* add docs around vertical step usage

* use signal inputs

* add vertical step story

* enhance documentation

* WIP

* Rename to Stepper

* adds horizontal stepper

* updated view logic

* add resizeobserver directive

* add basic responsizeness to stepper

* add comment about stateChanged method

* update responsive logic

* reformat with prettier

* remove obsolete applyBorder input

* fix step type mismatch

* fix incorrect step import

* fix borken disabled logic

* fix class logic

* move tabpanel out of tablist. correctly increment ids

* make map private

* use accordion attributes for vertical stepper

* barrel export directive

* fixing types

* remove now obsolete step-content

* reimplement constructors to fix storybook not rendering

* move padding to different container

* move map and observer into directive

* remove useless test for now

* add comment about constructor implementation

* add template variable for disabled state

* fix typo

* simplify resize observer directive logic

* add jsdoc description

* use typography directive

* use the variable for step disabled

* Update libs/components/src/stepper/stepper.mdx

Co-authored-by: Vicki League <vleague@bitwarden.com>

---------

Co-authored-by: Will Martin <contact@willmartian.com>
Co-authored-by: Vicki League <vleague@bitwarden.com>
2025-06-06 14:04:01 -04:00
Matt Bishop
703715aea5 [PM-4780] Relax UUID validation (#6792)
* Relax UUID validation

* Remove unneeded word boundaries

* Compress given the duplicated three parts

* Revert "Added separate function for GUID validation for passkeys (#6806)"
2025-06-06 10:57:57 -04:00
Jason Ng
fdd4d4b9fe [PM-22270] Only Show Generator Nudge For New Accounts (#15059)
* create new account nudge service to replace repeat nudge services checking for 30 day limit
2025-06-06 09:53:08 -04:00
Addison Beck
e8224fdbe3 feat(nx): add basic-lib generator for streamlined library creation (#14992)
* feat(nx): add basic-lib generator for streamlined library creation

This adds a new nx-plugin library with a generator for creating "common" type
Bitwarden libs. It is set up to accept a lib name, description, team, and
directory. It then
- Creates a folder in the directory (default to libs)
- Sets up complete library scaffolding:
  - README with team ownership
  - Build, lint and test task configuration
  - Test infrastructure
- Configures TypeScript path mapping
- Updates CODEOWNERS with team ownership
- Runs npm i

This will make library creation more consistent and reduce manual boilerplate setup.

The plugin design itself was generated by `npx nx g plugin`. This means we
used a plugin to generate a plugin that exports generators. To create our
generator generator, we first needed a generator.

* fix(dirt/card): correct tsconfig path in jest configuration

Fix the relative path to tsconfig.base in the dirt/card library's Jest config.
The path was incorrectly using four parent directory traversals (../../../../)
when only three (../../../) were needed to reach the project root.

* chore(codeowners): clarify some nx ownership stuff
2025-06-05 14:20:23 -04:00
Bernd Schoolmann
509af7b7bd [PM-20235] Disable login with device masterpasswordhash flow (#14236)
* Disable login with device masterpasswordhash flow

* Remove old test

* Fix tests

* Undo changes to cargo lock
2025-06-05 16:52:48 +00:00
Addison Beck
299976e55a fix(eslint): extend tsconfig.base in tsconfig.eslint (#15082)
* fix(eslint): extend tsconfig.base in tsconfig.eslint

* fix(eslint): clean up new lint errors
2025-06-05 11:08:03 -04:00
Nick Krantz
92f3630fed rework logic for empty vault nudge (#15013) 2025-06-05 09:18:43 -05:00
Nick Krantz
729d5d3134 [PM-21546] Migrate from enum to constant object (#14975)
* add generic `union-of-values` helper

* migrate `GeneratorDialogAction` to a constant

* migrate `VaultState` to a constant

* migrate `AtRiskCarouselDialogResult` to a constant

* migrate `CredentialGeneratorDialogAction` to a constant

* migrate `FolderAddEditDialogResult` to a constant

* migrate `ViewCipherDialogResult` to a constant

* migrate `VisibleVaultBanner` to a constant

* migrate `VaultFilterLabel` to a constant

* migrate `WebVaultGeneratorDialogResult` to a constant

* migrate `BulkDeleteDialogResult` to a constant

* migrate `BulkMoveDialogResult` to a constant

* migrate `AddEditCipherDialogResult` to a constant

* migrate `VaultItemDialogResult` to a constant

* migrate `BrowserPromptState` to a constant

* migrate `NudgeType` to a constant

* migrate `SecurityTaskStatus` to a constant

* migrate `CipherRepromptType` to a constant

* migrate `SecureNoteType` to a constant

* migrate `FieldType` to a constant

* migrate `LinkedIdType` to a constant

* migrate `CollectionAssignmentResult` to a constant

* migrate `AddEditFolderDialogResult` to a constant

* migrate `AttachmentDialogResult` to a constant

* fix CipherType in delete organization dialog

* fix `in` statement in VaultFilter

* Fix build errors across enum updates

* fix two more CipherType castings

* update CipherResponse `CipherType`

* define type for `fieldType` parameter

* refine how `cipherTypeNames` is generated and add utility function for grabbing cipher type name

* use `CipherType` rather than `number`

* add stricter typing for `FieldType`

* add fixme for `CipherType` to be ADR-0025 compliant

* remove error throw for `toCipherTypeName` and instead update typing to have `| undefined`

* add helpers for CipherType conversions

* prefer `undefined`
2025-06-05 08:45:52 -05:00
Oscar Hinton
e8e2181252 Migrate remaining components to standalone in libs/components (#15053)
Migrates the remaining non standalone components from libs/components. Also resolved some linting ignores and applying strict typescript.
2025-06-05 09:52:53 +02:00
Jordan Aasen
7386a4fa9e [PM-19306] - [Vault] In Admin Console Policies area add the remove card item type policy (#15065)
* WIP - add restricted item types policy

* admin console restricted item types

* add comment

* update feature flag

* fix comment
2025-06-04 15:51:43 -07:00
Will Martin
a17cc0b265 [CL-640] update bit-simple-dialog styles (#14916) 2025-06-04 15:21:17 -04:00
Daniel James Smith
5bd3ab5b3f Remove unneeded setup code for import.service tests (#15069)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-06-04 19:11:35 +02:00
Oscar Hinton
8f74eaea1c Remove standalone true from auth (#15035)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-04 09:22:37 -04:00
Nick Krantz
1bd77fec7a account for deleted ciphers for empty vault nudge (#15014) 2025-06-04 08:09:14 -05:00
Nick Krantz
65f4ff6909 [PM-21791] Nudge UI Bug Fixes (#15010)
* remove margin bottom from empty vault nudge

* update page title to vault options

* show badge on import of vault settings

* add margin between no items title and icon

* add mock to test

* add comment for destroying vault settings page

* fix logic for manage/create collection

* account for deleted ciphers when showing the import nudge

* refactor name of vault import nudge
2025-06-04 08:07:44 -05:00
Bernd Schoolmann
9aaeacf2be [PM-22194] Remove key rotation v1 (#14945) 2025-06-03 23:52:53 +02:00
Jordan Aasen
4223a7e2d7 [PM-22344] - update response type for shareManyWithServer (#15061)
* update response type for shareManyWithServer

* build new ListResponse
2025-06-03 13:59:34 -07:00
Maciej Zieniuk
ce3ce17010 [PM-21147] User key transferred over ipc within desktop app without its prototype (#15047)
* user key transferred over ipc within desktop app without its prototype.

`UserKey` object was transferred over IPC as regular `Object` type and not recreated as `SymmetricCryptoKey` type, losing its original functions and properties. As a result `inner` method did not exist and user key silently failed during decryption of encrypted client key halves during biometric unlock.

* ipc biometrics serializable user key type

* use encrypt service directly for decryption

* moving electron key service to KM

* log error when unlock via biometrics fails with exception in lock component

* bring back tech debt comment

* lock component logging prefix
2025-06-03 22:12:11 +02:00
Oscar Hinton
5fd7c181de Remove standalone true from dirt (#15041)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-03 13:57:17 -04:00
SmithThe4th
2e66addd6a [PM-19632] Remove security task flag - step 1 (#14904)
* Step 1- remove business logic

* removed dependency

* removed leftover flags
2025-06-03 12:20:29 -04:00
Justin Baur
8a29df64d9 [PM-20398] Add Notifications logging (#13640)
* Add Logging to know which notification transport is being used

* Remove debug log
2025-06-03 11:08:29 -04:00
Nick Krantz
24ae013f71 [PM-22269] Generator/Send Nudge Updates (#15049)
* remove margin from the bottom of paragraph tag in generator spotlight

* update aria-label text to match translation key

* Remove `SendNudgeStatus` nudge type

* update web send page to use new title and description

* update old no sends title and description

* hide internal contents on generator nudge

* remove NudgeService from send-v2 test
2025-06-03 14:04:29 +00:00
Alex Morask
618ab229e9 Remove pm-18794-provider-payment-method (#14865) 2025-06-03 07:50:50 -05:00
Oscar Hinton
95856bf3cf [CL-714] Remove standalone true from tools (#15039)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-03 09:55:58 +02:00
Bernd Schoolmann
23ec6bacc9 [PM-20225] Prevent legacy users without userkey from logging in (#14267)
* Prevent legacy users without userkey from logging in

* Remove further web-migration code for legacy users

* Add i18n for legacy user error message

* Update comment

* Remove migrate legacy component

* Remove i18n messages

* Remove migrate legacy encryption reference
2025-06-02 23:56:29 +02:00
Addison Beck
26caeb3083 Implement and extend tsconfig.base across projects (#14554)
* Implement and extend tsconfig.base across projects

* fixup! Merge remote-tracking branch 'origin/main' into rename-tsconfig

* fix: import tsconfig.base from components

* fix: skip typechecking node modules

* fixing tests

* fix the tests for real

* undo accidentally change
2025-06-02 20:38:17 +00:00
Oscar Hinton
f3ff1e98ec Remove standalone true from vault (#15040)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-02 13:22:57 -07:00
Oscar Hinton
14e363ad86 Remove standalone true from km (#15042)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-02 21:38:20 +02:00
Oscar Hinton
26fb7effd3 Remove standalone true from platform and UIF (#15032)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-02 20:03:04 +02:00
Daniel Riera
f77bd8c554 PM-16653 remove idp auto submit login step 1 (#14847)
* PM-16653 remove idp auto submit login step 1

* remove config service mock

* remove configservice from main.ts

* edit test describes to be accurate

* Update apps/browser/src/autofill/background/auto-submit-login.background.ts

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>

---------

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
2025-06-02 13:37:28 -04:00