* 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
* Relax UUID validation
* Remove unneeded word boundaries
* Compress given the duplicated three parts
* Revert "Added separate function for GUID validation for passkeys (#6806)"
* 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`
* 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>
Upgrade Angular to v19 using the update guide.
- Add `standalone: false` to any missed component in stories or tests.
- Update jest.config to follow the new best practices.
* Get userId from response if available
This is a small improvement for the Auth team which avoids inspection of the access token, sometimes.
* Initialize sdk clients with a userId
* return both Cipher and encryptedFor when encrypting a cipher
Update cipher api requests to include encryptedFor attribute
* Prefer named types with documentation
* Update sdk to latest
* Fixup types
* Fixup tests
* Revert getting userId from identity token response
---------
Co-authored-by: Shane <smelton@bitwarden.com>
* Draft optimization of getNestedCollectionTree
* Added feature flag to wrap nestedTraverse_vNext. added the old implementation back in for feature flagging.
* Correction from CR
* Copied tests over for the vNext method.
---------
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Upgrades to Eslint v9. Since this is a major version there were breaking changes, but since we've previously migrated to flat configs in #12806 those were minimal.
* move `fullSync` contents to private methods in prep to storing the respective promise
* store in-flight sync so multiple calls to the sync service are avoided
* Revert "store in-flight sync so multiple calls to the sync service are avoided"
This reverts commit 233c8e9d4b.
* Revert "move `fullSync` contents to private methods in prep to storing the respective promise"
This reverts commit 3f686ac6a4.
* store inflight API calls for sync service
- This avoids duplicate network requests in a relatively short amount of time but still allows consumers to call `fullSync` if needed
* add debug log for duplicate sync
* first draft at an idea dependency graph
* ignore existing errors
* remove conflicting rule regarding internal platform logic in libs
* review: allow components to import from platform
* PM-20540 - TwoFactorAuthComponent - Refactor determineDefaultSuccessRoute to rely on user's auth status as the loginStrategyService's state is cleared after successful AuthN
* PM-20540 - DeepLinkGuard - Refactor to exempt login-initiated so that TDE + unlock with MP + deep link works.
* doc: Add documentation and change folder structure.
* test: add test for new excluded route.
---------
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
* Add new encrypt service functions
* Undo changes
* Cleanup
* Fix build
* Fix comments
* Switch encrypt service to use SDK functions
* Add cose migration on userkey rotation
* Update sdk
* Set featureflag to default disabled
* Add tests
* Update sdk to build 168
* Make changes according to feedback
* Passed in userId on RemovePasswordComponent.
* Added userId on other references to KeyConnectorService methods
* remove password component refactor, test coverage, enabled strict
* explicit user id provided to key connector service
* redirect to / instead when user not logged in or not managing organization
* key connector service explicit user id
* key connector service no longer requires account service
* key connector service missing null type
* cli convert to key connector unit tests
* remove unnecessary SyncService
* error toast not showing on ErrorResponse
* bad import due to merge conflict
* bad import due to merge conflict
* missing loading in remove password component for browser extension
* error handling in remove password component
* organization observable race condition in key-connector
* usesKeyConnector always returns boolean
* unit test coverage
* key connector reactive
* reactive key connector service
* introducing convertAccountRequired$
* cli build fix
* moving message sending side effect to sync
* key connector service unit tests
* fix unit tests
* move key connector components to KM team ownership
* new unit tests in wrong place
* key connector domain shown in remove password component
* type safety improvements
* convert to key connector command localization
* key connector domain in convert to key connector command
* convert to key connector command unit tests with prompt assert
* organization name placement change in the remove password component
* unit test update
* key connector url required to be provided when migrating user
* unit tests in wrong place after KM code ownership move
* infinite page reload
* failing unit tests
* failing unit tests
---------
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
* Passed in userId on RemovePasswordComponent.
* Added userId on other references to KeyConnectorService methods
* remove password component refactor, test coverage, enabled strict
* explicit user id provided to key connector service
* redirect to / instead when user not logged in or not managing organization
* key connector service explicit user id
* key connector service no longer requires account service
* key connector service missing null type
* cli convert to key connector unit tests
* remove unnecessary SyncService
* error toast not showing on ErrorResponse
* bad import due to merge conflict
* bad import due to merge conflict
* missing loading in remove password component for browser extension
* error handling in remove password component
* organization observable race condition in key-connector
* usesKeyConnector always returns boolean
* unit test coverage
* key connector reactive
* reactive key connector service
* introducing convertAccountRequired$
* cli build fix
* moving message sending side effect to sync
* key connector service unit tests
* fix unit tests
* unit tests in wrong place after KM code ownership move
* infinite page reload
* failing unit tests
* failing unit tests
---------
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
This PR creates a new ChangePasswordComponent. The first use-case of the ChangePasswordComponent is to place it inside a new PasswordSettingsComponent, which is accessed by going to Account Settings > Security.
The ChangePasswordComponent will be updated in future PRs to handle more change password scenarios.
Feature Flags: PM16117_ChangeExistingPasswordRefactor
* update names of vault nudge service and their corresponding files, convert components using showNudge$ to instead target spotlight and badges directly with new observables. Core logic for dismiss remains the same
* Created mappings for client domain object to SDK
* Add abstract decrypt observable
* Added todo for future consideration
* Added implementation to cipher service
* Added adapter and unit tests
* Created cipher encryption abstraction and service
* Register cipher encryption service
* Added tests for the cipher encryption service
* changed signature
* Updated feature flag name
* added new function to be used for decrypting ciphers
* Added new encryptedKey field
* added new function to be used for decrypting ciphers
* Manually set fields
* Added encrypted key in attachment view
* Fixed test
* Updated references to use decrypt with feature flag
* Added dependency
* updated package.json
* lint fix
* fixed tests
* Fixed small mapping issues
* Fixed test
* Added function to decrypt fido2 key value
* Added function to decrypt fido2 key value and updated test
* updated to use sdk function without prociding the key
* updated localdata sdk type change
* decrypt attachment content using sdk
* Fixed dependency issues
* updated package.json
* Refactored service to handle getting decrypted buffer using the legacy and sdk implementations
* updated services and component to use refactored version
* Updated decryptCiphersWithSdk to use decryptManyLegacy for batch decryption, ensuring the SDK is only called once per batch
* Fixed merge conflicts
* Fixed merge conflicts
* Fixed merge conflicts
* Fixed lint issues
* Moved getDecryptedAttachmentBuffer to cipher service
* Moved getDecryptedAttachmentBuffer to cipher service
* ensure CipherView properties are null instead of undefined
* Fixed test
* ensure AttachmentView properties are null instead of undefined
* Linked ticket in comment
* removed unused orgKey