-
{{'purgeVaultDesc' | i18n}}
+
{{(organizationId ? 'purgeOrgVaultDesc' : 'purgeVaultDesc') | i18n}}
{{'purgeVaultWarning' | i18n}}
;
@@ -32,11 +37,17 @@ export class PurgeVaultComponent {
const request = new PasswordVerificationRequest();
request.masterPasswordHash = await this.cryptoService.hashPassword(this.masterPassword, null);
try {
- this.formPromise = this.apiService.postPurgeCiphers(request);
+ this.formPromise = this.apiService.postPurgeCiphers(request, this.organizationId);
await this.formPromise;
- this.analytics.eventTrack.next({ action: 'Purged Vault' });
+ this.analytics.eventTrack.next({
+ action: this.organizationId != null ? 'Purged Organization Vault' : 'Purged Vault',
+ });
this.toasterService.popAsync('success', null, this.i18nService.t('vaultPurged'));
- this.router.navigate(['vault']);
+ if (this.organizationId != null) {
+ this.router.navigate(['organizations', this.organizationId, 'vault']);
+ } else {
+ this.router.navigate(['vault']);
+ }
} catch { }
}
}
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index d3be37944d5..ef89997c441 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -909,9 +909,15 @@
"purgeVault": {
"message": "Purge Vault"
},
+ "purgedOrganizationVault": {
+ "message": "Purged organization vault."
+ },
"purgeVaultDesc": {
"message": "Proceed below to delete all items and folders in your vault. Items that belong to an organization that you share with will not be deleted."
},
+ "purgeOrgVaultDesc": {
+ "message": "Proceed below to delete all items in the organization's vault."
+ },
"purgeVaultWarning": {
"message": "Purging your vault is permanent. It cannot be undone."
},