mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 21:33:27 +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:
@@ -2487,6 +2487,12 @@
|
|||||||
"personalOwnershipPolicyInEffectImports": {
|
"personalOwnershipPolicyInEffectImports": {
|
||||||
"message": "An organization policy has blocked importing items into your individual vault."
|
"message": "An organization policy has blocked importing items into your individual vault."
|
||||||
},
|
},
|
||||||
|
"restrictCardTypeImport": {
|
||||||
|
"message": "Cannot import card item types"
|
||||||
|
},
|
||||||
|
"restrictCardTypeImportDesc": {
|
||||||
|
"message": "A policy set by 1 or more organizations prevents you from importing cards to your vaults."
|
||||||
|
},
|
||||||
"domainsTitle": {
|
"domainsTitle": {
|
||||||
"message": "Domains",
|
"message": "Domains",
|
||||||
"description": "A category title describing the concept of web domains"
|
"description": "A category title describing the concept of web domains"
|
||||||
|
|||||||
@@ -1716,6 +1716,12 @@
|
|||||||
"accountRestricted": {
|
"accountRestricted": {
|
||||||
"message": "Account restricted"
|
"message": "Account restricted"
|
||||||
},
|
},
|
||||||
|
"restrictCardTypeImport": {
|
||||||
|
"message": "Cannot import card item types"
|
||||||
|
},
|
||||||
|
"restrictCardTypeImportDesc": {
|
||||||
|
"message": "A policy set by 1 or more organizations prevents you from importing cards to your vaults."
|
||||||
|
},
|
||||||
"filePasswordAndConfirmFilePasswordDoNotMatch": {
|
"filePasswordAndConfirmFilePasswordDoNotMatch": {
|
||||||
"message": "“File password” and “Confirm file password“ do not match."
|
"message": "“File password” and “Confirm file password“ do not match."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2160,6 +2160,12 @@
|
|||||||
"restrictedItemTypesPolicyDesc": {
|
"restrictedItemTypesPolicyDesc": {
|
||||||
"message": "Do not allow members to create card item types."
|
"message": "Do not allow members to create card item types."
|
||||||
},
|
},
|
||||||
|
"restrictCardTypeImport": {
|
||||||
|
"message": "Cannot import card item types"
|
||||||
|
},
|
||||||
|
"restrictCardTypeImportDesc": {
|
||||||
|
"message": "A policy set by 1 or more organizations prevents you from importing cards to your vaults."
|
||||||
|
},
|
||||||
"yourSingleUseRecoveryCode": {
|
"yourSingleUseRecoveryCode": {
|
||||||
"message": "Your single-use recovery code can be used to turn off two-step login in the event that you lose access to your two-step login provider. Bitwarden recommends you write down the recovery code and keep it in a safe place."
|
"message": "Your single-use recovery code can be used to turn off two-step login in the event that you lose access to your two-step login provider. Bitwarden recommends you write down the recovery code and keep it in a safe place."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
<bit-callout type="info" *ngIf="importBlockedByPolicy">
|
<bit-callout type="info" *ngIf="importBlockedByPolicy">
|
||||||
{{ "personalOwnershipPolicyInEffectImports" | i18n }}
|
{{ "personalOwnershipPolicyInEffectImports" | i18n }}
|
||||||
</bit-callout>
|
</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">
|
<form [formGroup]="formGroup" [bitSubmit]="submit" id="import_form_importForm">
|
||||||
<bit-section>
|
<bit-section>
|
||||||
<bit-section-header>
|
<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 { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
||||||
|
import { RestrictedItemTypesService } from "@bitwarden/common/vault/services/restricted-item-types.service";
|
||||||
import {
|
import {
|
||||||
AsyncActionsModule,
|
AsyncActionsModule,
|
||||||
BitSubmitDirective,
|
BitSubmitDirective,
|
||||||
@@ -161,6 +162,9 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
protected organization: Organization;
|
protected organization: Organization;
|
||||||
protected destroy$ = new Subject<void>();
|
protected destroy$ = new Subject<void>();
|
||||||
|
|
||||||
|
protected readonly isCardTypeRestricted$: Observable<boolean> =
|
||||||
|
this.restrictedItemTypesService.restricted$.pipe(map((items) => items.length > 0));
|
||||||
|
|
||||||
private _importBlockedByPolicy = false;
|
private _importBlockedByPolicy = false;
|
||||||
protected isFromAC = false;
|
protected isFromAC = false;
|
||||||
|
|
||||||
@@ -220,6 +224,7 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
protected importCollectionService: ImportCollectionServiceAbstraction,
|
protected importCollectionService: ImportCollectionServiceAbstraction,
|
||||||
protected toastService: ToastService,
|
protected toastService: ToastService,
|
||||||
protected accountService: AccountService,
|
protected accountService: AccountService,
|
||||||
|
private restrictedItemTypesService: RestrictedItemTypesService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
protected get importBlockedByPolicy(): boolean {
|
protected get importBlockedByPolicy(): boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user