91 Commits

Author SHA1 Message Date
Nick Krantz
09e5296b1e [PM-46898] fix: Use "My items" casing consistently (#24752)
* [PM-46898] fix: Name new My items collections with myItemsV2

The default user collection was named from the "myItems" key ("My Items"),
while the rest of the UI uses "myItemsV2" ("My items"). Switch the web,
browser, desktop and CLI paths that create the collection to "myItemsV2"
and drop the now-unused "myItems" key. Existing collections keep their
stored name.

* Use errorImportingMyItemsMultiCollectionV2 for the lowercase My items import error

* Label the My items shared folder from i18n in the vault table

* Label the My items shared folder from i18n in the item view and edit form

* Keep other members' emails on their My items collections and test the labels
2026-11-13 10:36:16 -06:00
Jared
4d76bbfb69 Feature flag is no longer required, keep code that is relevant to the feature flag being on. Revoke the rest (#24645) 2026-11-12 14:30:54 -05:00
Oscar Hinton
f09dad1f47 (B3) [PAM-337] Add collection access-rule flag and dialog callout slot (#23909)
* [PAM-337] Add collection access-rule flag and dialog callout slot

Carries hasEnabledAccessRule from the collection details response through
CollectionData, Collection, CollectionView and CollectionAdminView, keeping
it off the SDK wire format. Adds the COLLECTION_ACCESS_RULE_CALLOUT token
and an NgComponentOutlet slot in the collection edit dialog; unprovided, it
renders nothing.

* PAM-337: Copy hasEnabledAccessRule onto collections that fail to decrypt

* Remove unrelated warning from toSdkCollection docblock

* PAM-337: Remove the remaining deny_unknown_fields claims

---------

Co-authored-by: Anders Åberg <github@andersaberg.com>
2026-10-16 21:00:00 +02:00
sven-bitwarden
4615d52e8e [PM-42581] Add Invite Staged Users Members Actions (#22822)
* Adds member actions for inviting staged users

* allows sending invites to a mix of staged/non-staged

* touchups post-review

* add JSDoc for sending staged invite

* client implementation of bulk response for staged users

* consolidate sendInvite into bulkSendInvite

Both hit the same endpoint, so sendInvite was duplicating the whole body for a
single id. It now delegates and adapts the first failure into a MemberActionResult,
keeping the return shape the row action's handleMemberActionResult expects.

bulkSendInvite takes user ids rather than views, since it only ever read .id.

* report partial failures when sending staged invites

The send-invite endpoint skips members that are no longer staged and reports them
per row, so a partial send is a normal outcome. sendStagedInvites only surfaced
errors when every member failed, so a mixed response showed just the success toast.

validationService.showError also could not render the failure list: an array has no
.message, so it fell through to the generic "unexpected error" string. Report the
distinct server messages in an error toast instead.

* routes invite/reinvte through the SDK

* converts promises to observables for SDK client to await higher up

* moves observable-streams to member actions service

* provide SdkService in member access report dialog spec

---------

Co-authored-by: JaredScar <thewolfbadger@gmail.com>
2026-10-13 11:37:12 -04:00
Bernd Schoolmann
ae828b43c2 [PM-44108] perf: Add performance measurements to unlock and sync (#23476) 2026-10-06 16:22:21 +00:00
Jared
915ac1e9b4 [PM-38906] bulk decrypt collections with failures unstacked (#22886)
* Bulk decrypt with decrypt with failures new PR

* Implements rename feature for when a collection fails decryption via SDK call

* PR comments actioned on

* PR claude comment fixes

* PR claude comment fixes

* PR claude comments fixed

* PR Claude Comment fixes

* Rid of unused signal

* Fix up PR comments from Thomas

* Updates feature flag to proper key from epic

* Fix PR claude finding 1

* PR Claude comment fixes

* Fix PR comments

* Fix up message

* Rids of error badge in table to go back to existing behavior since no design/product capacity right now. Also rids of warning box above name of broken collection name
2026-10-05 13:58:27 -04:00
Todd Martin
1d44d8a3c8 fix(userId): Add userId on auto-confirm method chain. 2026-10-02 14:40:10 -04:00
rr-bw
4f42a709f3 [Auth / PM-35601] Update Password Request Models (Admin Console) (#20664)
Update OrganizationUserResetPasswordRequest to use a standard constructor() method that take MasterPasswordAuthenticationData and MasterPasswordUnlockData.
2026-09-01 13:35:02 -07:00
Oscar Hinton
7a45de6a1a [PM-40212] Enable-PAM UI (member toggle + bulk Activate PAM) (#22478)
* [PM-40212] Web vault: enable-PAM UI (member toggle + bulk Activate PAM)

Add the web-vault affordances to grant members Privileged Access
Management access, mirroring the Secrets Manager pattern:

- Thread `accessPam` through the org-user response, list/admin views,
  and the single-user update request.
- Add a per-member PAM toggle to the edit-member dialog (both the
  Details-tab and Role-tab layouts), gated on `usePam` + FeatureFlag.Pam.
- Add a bulk "Activate PAM" command under the Secrets Manager CTA on the
  members list, driving PUT organizations/{orgId}/users/enable-pam.

The affordances are hidden unless the org is PAM-entitled (`usePam`)
and the feature flag is on; the server's UsePam rejection remains the
fallback. i18n keys added to the web `en` locale only.

* refactor(admin-console): address review feedback on bulk-enable-pam dialog

- Use app- selector prefix on BulkEnablePamDialogComponent
- Self-close the bit-avatar tag

* test(admin-console): cover openBulkActivatePamDialog in member dialog manager spec

* refactor(admin-console): rename PAM UI to Privileged Controls

Rename the enable-PAM affordances to the product name "Privileged
Controls", and mark the name as untranslatable so Crowdin leaves it
intact:

- Rename the six new web `en` i18n keys to `privilegedControls*` /
  `*PrivilegedControls`, and give each a description noting that
  'Privileged Controls' is a product name and should not be translated
  (matching the Bitwarden Authenticator and Duo entries).
- Expand the "Activate PAM" button to "Activate Privileged Controls" and
  drop the "(PAM)" parenthetical from the bulk description, since the
  acronym no longer maps to the product name.
- Rename BulkEnablePamDialogComponent and its three files to
  bulk-enable-privileged-controls-dialog, along with the selector,
  dialog data type, and the openBulkActivatePrivilegedControlsDialog /
  bulkActivatePrivilegedControls / canUsePrivilegedControls /
  privilegedControlsEnabled members and the two checkbox QA ids.

Wire-level names keep the `pam` spelling because the client cannot
rename them unilaterally: the serialized `accessPam` request property,
the `AccessPam` response property, and the `enable-pam` endpoint (plus
the method mirroring it). `FeatureFlag.Pam` and `usePam` are unchanged
and predate this branch.

* refactor(admin-console): self-close bit-menu-divider in the new menu item

Addresses review feedback on the Privileged Controls bulk-action menu
item.
2026-08-17 19:27:10 +02:00
Jared
3f4de9f5fc [PM-36409] Enhance type safety across various components (#22391)
* refactor: enhance type safety across various components

- Updated `organizationRedirectGuard` to allow `undefined` in `customRedirect` parameter.
- Modified `UserConfirmComponent`, `AccountComponent`, and other components to use optional chaining and non-null assertions for better type safety.
- Removed unnecessary `@ts-strict-ignore` comments from several files.
- Ensured consistent handling of potentially undefined values in form submissions and API requests.
- Improved overall code clarity and maintainability by enforcing stricter type definitions.

* test: add unit test for undefined callback in organization redirect guard

- Introduced a new route in the organization redirect guard to handle cases where the redirect callback returns undefined.
- Added a test to verify that navigating to this route correctly falls back to the admin console redirect.
- Removed unused taxFormPromise from AccountComponent for cleaner code.

* refactor: remove unused secret property and formPromise from DeleteOrganizationDialogComponent

- Eliminated the `secret` property and `formPromise` from the component to streamline the code.
- Updated the formGroup initialization to reflect these changes, enhancing clarity and maintainability.
2026-08-13 13:40:30 -04:00
Bernd Schoolmann
296f4a641f refactor(crypto): move admin-console callers to @bitwarden/legacy-crypto (#22367) 2026-08-13 09:19:29 +10:00
Bernd Schoolmann
39af779fe2 refactor(crypto): split out legacy compat key service (#22319) 2026-08-11 10:58:58 -04:00
Brandon Treston
ec51268751 add problem detail support, wire up email changing (#21878)
* add problem detail support, wire up email changing

* fix tests

* add name

* clear error on value change

* typos

* add more error messages

* add name guard

* fix silent rewrite of name on save

* fix tests
2026-07-29 09:43:36 -04:00
Jared
31a9bf7a47 refactor: remove ConfigService dependency from various components (#22078)
- Removed ConfigService from MainBackground and ServiceContainer classes.
- Updated DefaultCollectionService to eliminate ConfigService usage, simplifying the decryption logic.
- Adjusted related tests to reflect the removal of ConfigService and ensure proper functionality without it.
2026-07-28 12:21:27 -04:00
Brandon Treston
637f134c3c [PM-38595] Update local collections from server response (#21744)
* update local collections from server response

* fix conditional
2026-07-09 11:35:25 -04:00
Brandon Treston
eb17e30477 [PM-39554] Create default collection when admin is demoted to user (#21632)
* create default collection when admin is demoted to user for centralize org data policy compliance

* add test

* clean up, add org ability checks
2026-07-09 11:31:41 -04:00
Jared
9844ddb8dc [PM-38896] Enhance DefaultCollectionService tests and improve decryption (#21439)
* [PM-28896] Enhance DefaultCollectionService tests and improve decryption logic

- Added tests to ensure decryption behavior when orgKeys$ emits null and transitions to valid keys.
- Updated the decryption logic to combine encrypted collections and organization keys, ensuring proper handling of locked/logged-out states.
- Improved test coverage for various scenarios involving collection decryption.

* Remove unused dependencies from package-lock.json to streamline the project and reduce potential security vulnerabilities.

* Add AuthService dependency to MainBackground and ServiceContainer

- Integrated AuthService into MainBackground and ServiceContainer to enhance authentication handling.
- Updated DefaultCollectionService to utilize AuthService for managing authentication status during collection decryption.
- Improved test coverage for DefaultCollectionService to reflect changes in authentication logic.

* Update package-lock.json to include new dependencies and versions for http-proxy-middleware and is-plain-obj, while removing outdated entries. This ensures compatibility with the latest Angular build tools and improves overall package management.

* Remove AuthService references from MainBackground and DefaultCollectionService, updating related tests to use orgKeys instead of authStatus for state management.

* Update package-lock.json to remove outdated http-proxy-middleware entries, downgrade its version in one instance, and add new dependencies for chokidar and readdirp, ensuring compatibility with Angular ESLint and improving package management.

* Add LogService to MainBackground and ServiceContainer; enhance DefaultCollectionService with error handling for batch decryption failures

* Refactor DefaultCollectionService to improve error handling and caching behavior for decrypted collections. Removed legacy batch decryption error handling and updated tests to reflect new retry logic on transient failures. Enhanced comments for clarity on state management and emission behavior.

* Refactor DefaultCollectionService by removing legacy error handling for batch decryption. This change simplifies the code and enhances clarity by eliminating unnecessary comments and streamlining the logic for handling decrypted collections.

* Update DefaultCollectionService tests to propagate errors from decryptMany instead of logging and returning empty lists. Refactor retry logic for transient failures to ensure proper error handling and state management during decryption attempts.

* Remove LogService dependency from various components to streamline service initialization and improve code clarity.

* Revert "Update DefaultCollectionService tests to propagate errors from decryptMany instead of logging and returning empty lists. Refactor retry logic for transient failures to ensure proper error handling and state management during decryption attempts."

This reverts commit 64af313c83.

* Revert "Refactor DefaultCollectionService by removing legacy error handling for batch decryption. This change simplifies the code and enhances clarity by eliminating unnecessary comments and streamlining the logic for handling decrypted collections."

This reverts commit a18dff10ac.

* Remove duplicate logService call

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2026-07-07 11:30:07 -04:00
Brandon Treston
8d073aec13 [PM-36407] Ts strict bulk member components (#21455)
* refactor bulk memmber action dialogs to be ts-strict

* add stories

* fix type errors in stories

* fix stories, fix more types

* fix type errors
2026-06-29 11:04:16 -04:00
Jared McCannon
291d5527e2 [PM-38904] - Managed to Claimed Rename (#21430)
* renamed from deprecated properties to replacements

* added alias to old property in case pulling from disk
2026-06-24 09:30:06 -05:00
Bernd Schoolmann
1dc31a487d [PM-39182] Migrate to relative imports - @bitwarden/team-admin-console-dev (#21329) 2026-06-22 09:39:36 -04:00
Thomas Rittson
a8798d356f [PM-34023] Remove 2FA account recovery flag (#21291) 2026-06-17 07:51:42 +10:00
Ike
eaf455f868 [PM-30365] Account recovery salt fallback (#20603)
* feat(auth): use server-provided salt with email fallback in account recovery

* refactor(auth): remove @ts-strict-ignore from account recovery files

* test(auth): cover server-salt and email-fallback paths in account recovery

* fix: add i18n message for error

* fix: strict typing error

* test: adding test back lost during conflict resolution.

* test: add coverage

* doc: add task to comment for easier unwinding later

* fix: use typeof check for more strict type checking on response from server

---------

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2026-06-05 16:19:31 -04:00
Brandon Treston
29d2eef4ec [PM-36406] Edit member dialog (#20868)
* add edit member dialog, refactored to be ts-strict from member-dialog component

* clean up

* fix dialog selector pattern

* remove feature flag logic

* clean up, fix type error

* fix circular dependency, fix dialog directive

* fix remove user

* refactor nested-checkbox, add story

* update member-access-report to use new member edit component
2026-06-02 09:51:28 -04:00
Brandon Treston
783dab6123 [PM-36363] Refactors org user view models and consumers to be ts-strict compliant (#20559)
* refactors org user view models and consumers to be ts-strict compliant

* DRY up invite logic

* clean up

* run prettier

* fix circular dep

* fix circular dependency (real)

* update test

* more clean up

* more type saftey fixes

* more types

* even more types

* add jsdoc

* fix test
2026-05-18 09:45:58 -04:00
Jared
114dee78e3 [PM-36565] creating new item from new dialog is not working (#20560)
* Refactor bidirectional mapping for CollectionType and SDK types

Updated the mapping between numeric CollectionType and SDK's numeric variant to ensure type safety. The previous string variant has been replaced with numeric values for better consistency and maintainability. This change enhances type checking in TypeScript and ensures that any additions to the CollectionTypes require corresponding updates in the mapping.

* Refactor CollectionType handling in collection models

Removed bidirectional mapping for CollectionType and SDK types, simplifying the type assignment in the Collection and CollectionView classes. This change enhances code clarity and reduces complexity by directly using the SDK's numeric variant for type assignments.

* Update CollectionType handling in tests to use numeric values

Replaced string representations of CollectionType with their corresponding numeric values in the collection SDK mapping tests. This change ensures consistency with the recent refactor of type handling, enhancing type safety and maintainability across the codebase.

* Update tests to use CollectionTypes for type assignments

Replaced numeric values with the CollectionTypes enum in the collection SDK mapping tests. This change improves code clarity and consistency, aligning with recent refactors to enhance type safety and maintainability across the codebase.

* Update Bitwarden SDK dependencies to version 0.2.0-main.739 in package.json and package-lock.json. This change ensures compatibility with the latest features and fixes in the SDK.

* Refactor tests to utilize CollectionTypes enum for type assignments

Updated test cases in default-collection-encryption.service.spec.ts to replace string literals with the CollectionTypes enum for improved type safety and consistency. This aligns with recent refactors aimed at enhancing code clarity and maintainability.
2026-05-12 10:51:56 -04:00
Thomas Rittson
90ca772452 Revert defective collection encrypt implementation (#20477) 2026-05-02 10:01:20 +10:00
sven-bitwarden
a82a071ec2 [PM-33887] Add Revocation Reasons to Member Page UI (#20442)
* adds revocation reason to revoked users

* move tooltip below

* Minor fixes
2026-04-30 16:42:21 -05:00
Jared
4f1fe27e60 [PM-34918] use sdk for collection decryption (#20136)
* Add Collection Encryption Service and integrate into collection handling

- Introduced `CollectionEncryptionService` and its default implementation `DefaultCollectionEncryptionService` for handling collection encryption and decryption.
- Updated `DefaultCollectionService` to utilize the new encryption service based on feature flags.
- Refactored collection-related classes to support SDK-based encryption operations.
- Added necessary imports and updated service providers in Angular module for dependency injection.
- Enhanced collection models to support SDK format conversions for encryption tasks.

* Implement encryption functionality in CollectionEncryptionService

- Added `encrypt` method to `CollectionEncryptionService` for encrypting collection views.
- Updated `DefaultCollectionEncryptionService` to include the new `encrypt` method, ensuring proper handling of SDK encryption.
- Modified `DefaultCollectionService` to utilize the encryption service based on feature flags.
- Enhanced collection and collection view models to support SDK format conversions for encryption tasks.

* refactor(collections): Update collection decryption methods and handle encryption support

- Modified `fromSdkCollectionView` to include `sourceCollection` for preserving `defaultUserCollectionEmail`.
- Updated decryption methods in `DefaultCollectionEncryptionService` to pass the original collection.
- Marked `encrypt` method as unsupported in the SDK, directing users to the legacy key-service path.
- Removed SDK feature flag checks from `DefaultCollectionService`'s `encrypt` method.

* refactor(collections): Update feature flag for collection decryption to PM35153

- Changed references from PM34918CollectionEncryptionService to PM35153CollectionSdkDecryption in both service and test files.
- Adjusted the feature flag checks to align with the new decryption implementation.

* Implement collection encryption using SDK in DefaultCollectionEncryptionService

* Refactor collection decryption in DefaultCollectionEncryptionService to handle errors individually and improve logging

* Add polyfills for Symbol.dispose and Symbol.asyncDispose in test setup; add unit tests for DefaultCollectionEncryptionService and collection SDK mapping

* Refactor error handling in DefaultCollectionEncryptionService to throw errors instead of returning EMPTY, improving error propagation and logging consistency.

* Refactor collection decryption and enhance type mapping

- Updated the `decrypt` method in `default-collection-encryption.service.ts` to utilize `decryptMany` for improved error handling.
- Added exhaustive bidirectional mapping for `CollectionType` and `SdkCollectionType` in `collection.ts`.
- Enhanced tests in `collection-sdk-mapping.spec.ts` to verify roundtrip conversions for `CollectionTypes`.
- Adjusted `Collection` and `CollectionView` classes to use the new type mappings for SDK interactions.

* Refactor DefaultCollectionEncryptionService to use a more concise method for encrypting collections. Update collection-sdk-mapping tests to utilize SdkEncString for better type safety. Simplify NewItemNudgeComponent's logic for showing nudge spotlight based on cipher type, ensuring null checks are handled appropriately.

* Refactor NewItemNudgeComponent to use strict null checks for cipher type comparison, enhancing code clarity and consistency.
2026-04-30 14:25:23 -05:00
Jared
9abb854520 [PM-33951] automatically confirm pending users on admin login (#20331)
* Add bulk auto-confirm functionality for organization users

- Introduced methods to retrieve pending auto-confirm users and to bulk auto-confirm them in the OrganizationUserApiService.
- Added OrganizationUserPendingAutoConfirmResponse model to handle responses for pending auto-confirmation.
- Implemented logic in DefaultAutomaticUserConfirmationService to automatically confirm users who accepted their invitations while the admin was offline.
- Updated feature flags to enable bulk auto-confirmation on login.

These changes enhance the user management experience by streamlining the confirmation process for organization users.

* Enhance MainBackground class by adding authService, accountService, and configService dependencies to the constructor. This update improves service integration for background operations.

* Add bulk auto-confirm functionality on user login

- Implemented the `initBulkAutoConfirmOnLoginSweep` method in `DefaultAutomaticUserConfirmationService` to trigger bulk auto-confirmation for users transitioning from Locked to Unlocked status.
- Enhanced unit tests to verify the behavior of the sweep service under different authentication states.
- Updated the service to utilize `AuthenticationStatus` for improved state management during user confirmation processes.

These changes streamline the user confirmation workflow, ensuring timely processing of pending confirmations upon user login.

* Refactor DefaultAutomaticUserConfirmationService for improved user confirmation handling

- Updated the `initBulkAutoConfirmOnLoginSweep` method to utilize a set for tracking seen user IDs, preventing duplicate processing during user state transitions.
- Enhanced error handling in the bulk auto-confirmation process to gracefully manage transient errors.
- Introduced a new `resolveAutoConfirmOrg` method to streamline organization retrieval logic for user confirmation.
- Updated unit tests to reflect changes in the handling of account information and ensure correct behavior during user confirmation processes.

These modifications enhance the efficiency and reliability of the user confirmation workflow, particularly during login transitions.

* Update BulkAutoConfirmOnLogin feature flag value to reflect new implementation

* Enhance unit tests for DefaultAutomaticUserConfirmationService to validate feature flag behavior. Added checks to ensure subscriptions are not set up when the feature flag is disabled and confirmed correct behavior during user state transitions. Updated the `initBulkAutoConfirmOnLoginSweep` method to be asynchronous for proper feature flag handling.
2026-04-30 11:44:42 -04:00
Jared McCannon
f8bd20649c [PM-28045] - Validate Organization Key Population (#19954)
* Adding validation to ensure organizations are not being created without keys unintentionally

* Added request test class.

* Removing request test.

* removing duplicate check

* Keys is different than key
2026-04-27 08:51:09 -05:00
Kyle Spearrin
be9099defb [PM-15489] 2fa account recovery (#19894)
* claude plan

* PR feedback

* implement 2fa reset to account recovery policy

* tests

* fix locales

* PR feedback

* PR fixes

* PR feedback

* fix CI build errors
2026-04-08 09:10:31 -04:00
Jared McCannon
e2bee489a4 [PM-30886] - Remove FF for Restoring Users. (#19155)
* removed feature flag for default user collection being created for restored users.

* leaving the url as we'll need it in case we have to revert a release
2026-03-02 10:38:54 -06:00
Jared McCannon
ba905dbf12 Fixing bulk restore request property name to match server. (#18757) 2026-02-05 08:03:09 -06:00
Jared McCannon
ae64706256 [PM-30891] - Create My Items On Restore (#18454)
* Added encrypted default collection name to new feature flagged restore user methods/endpoint.

* corrected filter to use null check with imperative code
2026-01-29 13:56:35 -06:00
SmithThe4th
7fa436f667 [PM-29465] Call new organization self revoke endpoint upon rejecting item transfer (#18352)
* Added self revoke and toast to the transfer item service

* Renamed to a clearer name

* Update organization-user-api.service.ts

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* fixed merge conflcits

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2026-01-19 10:55:45 -05:00
Leslie Xiong
44bdaf71b3 Desktop/pm 18769/migrate vault filters (#17919)
Migrated vault filters to new v3 vault's navigation

* Decoupled existing vault filtering from vault component by using routed params with routed-vault-filter-bridge
* Converted vault filters to standalone components
* Removed extending filter Base Components from deprecated /libs/angular library and handled logic directly
* Moved shared 'models' and 'services' directories from web-vault into /libs/vault
2026-01-15 16:17:00 +01:00
SmithThe4th
f018ce36a1 Revert "[PM-28455] Fix vault breaking when collection name decryption fails (…" (#18343)
This reverts commit 20974f8195.
2026-01-13 19:38:56 +00:00
SmithThe4th
20974f8195 [PM-28455] Fix vault breaking when collection name decryption fails (#18331)
* Set error cannot decrypt when collection name cannot be decrypted

* Put back previous comment
2026-01-13 12:38:28 -05:00
Brandon Treston
bb318ee22e Ac/pm 26364 extension UI for auto confirm (#17258)
* create nav link for auto confirm in settings page

* wip

* WIP

* create auto confirm library

* migrate auto confirm files to lib

* update imports

* fix tests

* fix nudge

* cleanup, add documentation

* clean up

* cleanup

* fix import

* fix more imports

* add tests

* design changes

* fix tests

* fix tw issue

* fix typo, add tests

* CR feedback

* more clean up, fix race condition

* CR feedback, cache policies, refactor tests

* run prettier with updated version

* clean up duplicate logic

* clean up

* fix test

* add missing prop for test mock

* clean up
2026-01-07 15:27:41 -05:00
Shane Melton
06d15e9681 [PM-27675] Browser item transfer integration (#17918)
* [PM-27675] Integrate dialogs into VaultItemTransferService

* [PM-27675] Update tests for new dialogs

* [PM-27675] Center dialogs and prevent closing with escape or pointer events

* [PM-27675] Add transferInProgress$ observable to VaultItemsTransferService

* [PM-27675] Hook vault item transfer service into browser vault component

* [PM-27675] Move defaultUserCollection$ to collection service

* [PM-27675] Cleanup dialog styles

* [PM-27675] Introduce readySubject to popup vault component to keep prevent flashing content while item transfer is in progress

* [PM-27675] Fix vault-v2 tests
2025-12-16 15:03:48 -08:00
Brandon Treston
19626d1b3e [PM-26363] Add one time setup dialog for auto confirm (#17104)
* add one time setup dialog for auto confirm

* add one time setup dialog for auto confirm

* fix copy, padding, cleanup observable logic

* cleanup

* cleanup

* refactor

* clean up

* more cleanup

* Fix deleted files

This reverts commit 7c18a5e512.
2025-11-07 15:58:39 -05:00
Maciej Zieniuk
ff12e672e6 [PM-23614] Remove activeUserOrgKeys$ from the key service (#17045)
* Remove activeUserOrgKeys$ from the key service

* test leftover

* test leftover
2025-11-06 19:27:13 +01:00
Brandon Treston
c1a988c2ab fix DI (#17076) 2025-10-28 12:25:56 -04:00
Brandon Treston
8162c06700 [PM-26372] Add auto confirm service (#17001)
* add state definition for auto confirm

* typo

* refactor organziation user service

* WIP create auto confirm service

* add POST method, finish implementation

* add missing userId param, jsdoc

* fix DI

* refactor organziation user service

* WIP create auto confirm service

* add POST method, finish implementation

* add missing userId param, jsdoc

* clean up, more DI fixes

* remove @Injectable from service, fix tests

* remove from libs/common, fix dir structure, add tests
2025-10-28 09:47:54 -04:00
Addison Beck
619694238b build: add nx configuration in libs/admin-console (#16538) 2025-09-24 11:20:18 +01:00
Bernd Schoolmann
4b73198ce5 [PM-23230] Implement KDF Change Service (#15748)
* Add new mp service api

* Fix tests

* Add test coverage

* Add newline

* Fix type

* Rename to "unwrapUserKeyFromMasterPasswordUnlockData"

* Fix build

* Fix build on cli

* Fix linting

* Re-sort spec

* Add tests

* Fix test and build issues

* Fix build

* Clean up

* Remove introduced function

* Clean up comments

* Fix abstract class types

* Fix comments

* Cleanup

* Cleanup

* Update libs/common/src/key-management/master-password/types/master-password.types.ts

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

* Update libs/common/src/key-management/master-password/services/master-password.service.ts

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

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Update libs/common/src/key-management/master-password/types/master-password.types.ts

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

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Add comments

* Fix build

* Add arg null check

* Cleanup

* Fix build

* Fix build on browser

* Implement KDF change service

* Deprecate encryptUserKeyWithMasterKey

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

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

* Add tests for null params

* Fix builds

* Cleanup and deprecate more functions

* Fix formatting

* Prettier

* Clean up

* Update libs/key-management/src/abstractions/key.service.ts

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

* Make emailToSalt private and expose abstract saltForUser

* Add tests

* Add docs

* Fix build

* Fix tests

* Fix tests

* Address feedback and fix primitive obsession

* Consolidate active account checks in change kdf confirmation component

* Update libs/common/src/key-management/kdf/services/change-kdf-service.spec.ts

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

* Add defensive parameter checks

* Add tests

* Add comment for follow-up epic

* Move change kdf service, remove abstraction and add api service

* Fix test

* Drop redundant null check

* Address feedback

* Add throw on empty password

* Fix tests

* Mark change kdf service as internal

* Add abstract classes

* Switch to abstraction

* use sdk EncString in MasterPasswordUnlockData

* fix remaining tests

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
2025-09-23 16:10:54 -04:00
Jordan Aasen
f642fbc4e6 [PM-24633] - group collections by org in individual vault filters (#16480)
* group collections by org in individual vault filters

* update vault filter

* use OrganizationId

* fix tests
2025-09-23 08:50:10 -07:00
Jordan Aasen
814305a778 [PM-24633] - group same parent name collections by org (#16404)
* key nested collections by orgId

* move groupByOrganization to separate function
2025-09-17 09:25:59 -07:00
Bernd Schoolmann
7985487d5b [PM-25458] Add error handling stubs & logging for critical decrypt paths (#16284)
* Add error handling stubs for critical decrypt paths

* Fix collection name decrypt

* Update docs

* address feedback

---------

Co-authored-by: Jake Fink <jfink@bitwarden.com>
2025-09-09 10:19:00 -04:00
Brandon Treston
28b5a2bb5e [PM-22717] Expose DefaultUserCollectionEmail to clients (#15643)
* enforce restrictions based on collection type, set default collection type

* fix ts strict errors

* fix default collection enforcement in vault header

* enforce default collection restrictions in vault collection row

* enforce default collection restrictions in AC vault header

* enforce default collection restriction for select all

* fix ts strict error

* switch to signal, fix feature flag

* fix story

* clean up

* remove feature flag, move check for defaultCollecion to CollecitonView

* fix test

* remove unused configService

* fix test: coerce null to undefined for collection Id

* clean up leaky abstraction for default collection

* fix ts-strict error

* fix parens

* add new property to models, update logic, refactor for ts-strict

* fix type

* rename defaultCollection getter

* clean up

* clean up

* clean up, add comment, fix submit

* add comment

* add feature flag

* check model for name

* cleanup readonly logic, remove featureflag logic

* wip

* refactor CollectionRequest into Create and Update models

* fix readonly logic

* cleanup

* set defaultUserCollectionEmail in decryption from Collection

* split save into update/create methods

* fix readonly logic

* fix collections post and put requests

* add defaultUserCollection email to model when submitting collection dialog
2025-08-26 11:42:52 -04:00