Browse Source

Update warning when removing an account using key connector (#1307)

pull/1309/head
Oscar Hinton 4 years ago committed by GitHub
parent
commit
0ce00a15e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      jslib
  2. 6
      src/app/common/base.people.component.ts
  3. 8
      src/app/organizations/manage/people.component.ts
  4. 3
      src/locales/en/messages.json

2
jslib

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit 10fa164ffc6f61e2264633ca4874473fa6afb4f4
Subproject commit a3e00cdc156e89d088b339afeb3af79615d6f496

6
src/app/common/base.people.component.ts

@ -180,7 +180,7 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai @@ -180,7 +180,7 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
async remove(user: UserType) {
const confirmed = await this.platformUtilsService.showDialog(
this.i18nService.t('removeUserConfirmation'), this.userNamePipe.transform(user),
this.deleteWarningMessage(user), this.userNamePipe.transform(user),
this.i18nService.t('yes'), this.i18nService.t('no'), 'warning');
if (!confirmed) {
@ -288,6 +288,10 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai @@ -288,6 +288,10 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
return !searching && this.users && this.users.length > this.pageSize;
}
protected deleteWarningMessage(user: UserType): string {
return this.i18nService.t('removeUserConfirmation');
}
protected getCheckedUsers() {
return this.users.filter(u => (u as any).checked);
}

8
src/app/organizations/manage/people.component.ts

@ -291,6 +291,14 @@ export class PeopleComponent extends BasePeopleComponent<OrganizationUserUserDet @@ -291,6 +291,14 @@ export class PeopleComponent extends BasePeopleComponent<OrganizationUserUserDet
});
}
protected deleteWarningMessage(user: OrganizationUserUserDetailsResponse): string {
if (user.usesKeyConnector) {
return this.i18nService.t('removeUserConfirmationKeyConnector');
}
return super.deleteWarningMessage(user);
}
private async showBulkStatus(users: OrganizationUserUserDetailsResponse[], filteredUsers: OrganizationUserUserDetailsResponse[],
request: Promise<ListResponse<OrganizationUserBulkResponse>>, successfullMessage: string) {

3
src/locales/en/messages.json

@ -2176,6 +2176,9 @@ @@ -2176,6 +2176,9 @@
"removeUserConfirmation": {
"message": "Are you sure you want to remove this user?"
},
"removeUserConfirmationKeyConnector": {
"message": "Warning! This user requires Key Connector to manage their encryption. Removing this user from your organization will permanently disable their account. This action cannot be undone. Do you want to proceed?"
},
"externalId": {
"message": "External Id"
},

Loading…
Cancel
Save