1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00

[PM-27662] Introduce vault item transfer service (#17876)

* [PM-27662] Add revision date to policy response

* [PM-27662] Introduce vault item transfer service

* [PM-27662] Add feature flag check

* [PM-27662] Add tests

* [PM-27662] Add basic implementation to Web vault

* [PM-27662] Remove redundant for loop

* [PM-27662] Remove unnecessary distinctUntilChanged

* [PM-27662] Avoid subscribing to userMigrationInfo$ if feature flag disabled

* [PM-27662] Make UserMigrationInfo type more strict

* [PM-27662] Typo

* [PM-27662] Fix missing i18n

* [PM-27662] Fix tests

* [PM-27662] Fix tests/types related to policy changes

* [PM-27662] Use getById operator
This commit is contained in:
Shane Melton
2025-12-09 15:14:40 -08:00
committed by GitHub
parent 6dba3ac377
commit f161a8c454
19 changed files with 1090 additions and 2 deletions

View File

@@ -1475,6 +1475,9 @@
"selectFile": {
"message": "Select a file"
},
"itemsTransferred": {
"message": "Items transferred"
},
"maxFileSize": {
"message": "Maximum file size is 500 MB."
},

View File

@@ -708,6 +708,9 @@
"addAttachment": {
"message": "Add attachment"
},
"itemsTransferred": {
"message": "Items transferred"
},
"fixEncryption": {
"message": "Fix encryption"
},

View File

@@ -84,7 +84,7 @@ import {
CipherViewLikeUtils,
} from "@bitwarden/common/vault/utils/cipher-view-like-utils";
import { filterOutNullish } from "@bitwarden/common/vault/utils/observable-utilities";
import { DialogRef, DialogService, ToastService, BannerComponent } from "@bitwarden/components";
import { DialogRef, DialogService, ToastService } from "@bitwarden/components";
import { CipherListView } from "@bitwarden/sdk-internal";
import {
AddEditFolderDialogComponent,
@@ -97,6 +97,8 @@ import {
DecryptionFailureDialogComponent,
DefaultCipherFormConfigService,
PasswordRepromptService,
VaultItemsTransferService,
DefaultVaultItemsTransferService,
} from "@bitwarden/vault";
import { UnifiedUpgradePromptService } from "@bitwarden/web-vault/app/billing/individual/upgrade/services";
import { OrganizationWarningsModule } from "@bitwarden/web-vault/app/billing/organizations/warnings/organization-warnings.module";
@@ -177,12 +179,12 @@ type EmptyStateMap = Record<EmptyStateType, EmptyStateItem>;
VaultItemsModule,
SharedModule,
OrganizationWarningsModule,
BannerComponent,
],
providers: [
RoutedVaultFilterService,
RoutedVaultFilterBridgeService,
DefaultCipherFormConfigService,
{ provide: VaultItemsTransferService, useClass: DefaultVaultItemsTransferService },
],
})
export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestroy {
@@ -349,6 +351,7 @@ export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestr
private premiumUpgradePromptService: PremiumUpgradePromptService,
private autoConfirmService: AutomaticUserConfirmationService,
private configService: ConfigService,
private vaultItemTransferService: VaultItemsTransferService,
) {}
async ngOnInit() {
@@ -644,6 +647,8 @@ export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestr
void this.unifiedUpgradePromptService.displayUpgradePromptConditionally();
this.setupAutoConfirm();
void this.vaultItemTransferService.enforceOrganizationDataOwnership(activeUserId);
}
ngOnDestroy() {

View File

@@ -5185,6 +5185,9 @@
"oldAttachmentsNeedFixDesc": {
"message": "There are old file attachments in your vault that need to be fixed before you can rotate your account's encryption key."
},
"itemsTransferred": {
"message": "Items transferred"
},
"yourAccountsFingerprint": {
"message": "Your account's fingerprint phrase",
"description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing."