mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[PM-21452] - [Vault] Import Data - Add callout when "Remove Card Item Type Policy" is enabled. (#15195)
* add callout for remove card item type policy * add comment * add shareReplay * remove shareReplay. fix type * fix import * remove subscription
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
<bit-callout type="info" *ngIf="importBlockedByPolicy">
|
||||
{{ "personalOwnershipPolicyInEffectImports" | i18n }}
|
||||
</bit-callout>
|
||||
<bit-callout
|
||||
[title]="'restrictCardTypeImport' | i18n"
|
||||
type="info"
|
||||
*ngIf="isCardTypeRestricted$ | async"
|
||||
>
|
||||
{{ "restrictCardTypeImportDesc" | i18n }}
|
||||
</bit-callout>
|
||||
<form [formGroup]="formGroup" [bitSubmit]="submit" id="import_form_importForm">
|
||||
<bit-section>
|
||||
<bit-section-header>
|
||||
|
||||
@@ -45,6 +45,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
||||
import { RestrictedItemTypesService } from "@bitwarden/common/vault/services/restricted-item-types.service";
|
||||
import {
|
||||
AsyncActionsModule,
|
||||
BitSubmitDirective,
|
||||
@@ -161,6 +162,9 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
protected organization: Organization;
|
||||
protected destroy$ = new Subject<void>();
|
||||
|
||||
protected readonly isCardTypeRestricted$: Observable<boolean> =
|
||||
this.restrictedItemTypesService.restricted$.pipe(map((items) => items.length > 0));
|
||||
|
||||
private _importBlockedByPolicy = false;
|
||||
protected isFromAC = false;
|
||||
|
||||
@@ -220,6 +224,7 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
protected importCollectionService: ImportCollectionServiceAbstraction,
|
||||
protected toastService: ToastService,
|
||||
protected accountService: AccountService,
|
||||
private restrictedItemTypesService: RestrictedItemTypesService,
|
||||
) {}
|
||||
|
||||
protected get importBlockedByPolicy(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user