From b8a23cf014acc877eef738a34935128857a2bcf2 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Mon, 28 Feb 2022 11:37:02 -0500 Subject: [PATCH] [feature] Implement scope warning for exports (#1504) --- .../organizations/tools/export.component.ts | 2 +- src/app/oss.module.ts | 2 ++ src/app/tools/export.component.html | 4 ++++ src/locales/en/messages.json | 24 +++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/app/organizations/tools/export.component.ts b/src/app/organizations/tools/export.component.ts index 71b11be258..0601d6b370 100644 --- a/src/app/organizations/tools/export.component.ts +++ b/src/app/organizations/tools/export.component.ts @@ -44,10 +44,10 @@ export class ExportComponent extends BaseExportComponent { } async ngOnInit() { - await super.ngOnInit(); this.route.parent.parent.params.subscribe(async (params) => { this.organizationId = params.organizationId; }); + await super.ngOnInit(); } async checkExportDisabled() { diff --git a/src/app/oss.module.ts b/src/app/oss.module.ts index 521ff7eaaa..38570162f5 100644 --- a/src/app/oss.module.ts +++ b/src/app/oss.module.ts @@ -58,6 +58,7 @@ import { ToastrModule } from "ngx-toastr"; import { AvatarComponent } from "jslib-angular/components/avatar.component"; import { CalloutComponent } from "jslib-angular/components/callout.component"; +import { ExportScopeCalloutComponent } from "jslib-angular/components/export-scope-callout.component"; import { IconComponent } from "jslib-angular/components/icon.component"; import { VerifyMasterPasswordComponent } from "jslib-angular/components/verify-master-password.component"; import { A11yTitleDirective } from "jslib-angular/directives/a11y-title.directive"; @@ -338,6 +339,7 @@ registerLocaleData(localeZhTw, "zh-TW"); EmergencyAccessViewComponent, EmergencyAddEditComponent, ExportComponent, + ExportScopeCalloutComponent, ExposedPasswordsReportComponent, FallbackSrcDirective, FamiliesForEnterpriseSetupComponent, diff --git a/src/app/tools/export.component.html b/src/app/tools/export.component.html index c18db826d9..5cd24412ec 100644 --- a/src/app/tools/export.component.html +++ b/src/app/tools/export.component.html @@ -12,6 +12,10 @@ {{ "personalVaultExportPolicyInEffect" | i18n }} +
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index e7100aef5a..4bf499b1e1 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -4742,5 +4742,29 @@ }, "sessionTimeout": { "message": "Your session has timed out. Please go back and try logging in again." + }, + "exportingPersonalVaultTitle": { + "message": "Exporting Personal Vault" + }, + "exportingOrganizationVaultTitle": { + "message": "Exporting Organization Vault" + }, + "exportingPersonalVaultDescription": { + "message": "Only the personal vault items associated with $EMAIL$ will be exported. Organization vault items will not be included.", + "placeholders": { + "email": { + "content": "$1", + "example": "name@example.com" + } + } + }, + "exportingOrganizationVaultDescription": { + "message": "Only the organization vault associated with $ORGANIZATION$ will be exported. Personal vault items and items from other organizations will not be included.", + "placeholders": { + "organization": { + "content": "$1", + "example": "My Org Name" + } + } } }