diff --git a/apps/web/src/app/admin-console/organizations/members/members.component.ts b/apps/web/src/app/admin-console/organizations/members/members.component.ts index 4f453762b5d..6bc86d5e72a 100644 --- a/apps/web/src/app/admin-console/organizations/members/members.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/members.component.ts @@ -66,6 +66,10 @@ import { GroupApiService } from "../core"; import { OrganizationUserView } from "../core/views/organization-user.view"; import { openEntityEventsDialog } from "../manage/entity-events.component"; +import { + AccountRecoveryDialogComponent, + AccountRecoveryDialogResult, +} from "./components/account-recovery/account-recovery-dialog.component"; import { BulkConfirmDialogComponent } from "./components/bulk/bulk-confirm-dialog.component"; import { BulkDeleteDialogComponent } from "./components/bulk/bulk-delete-dialog.component"; import { BulkEnableSecretsManagerDialogComponent } from "./components/bulk/bulk-enable-sm-dialog.component"; @@ -738,18 +742,38 @@ export class MembersComponent extends BaseMembersComponent } async resetPassword(user: OrganizationUserView) { - const dialogRef = ResetPasswordComponent.open(this.dialogService, { - data: { - name: this.userNamePipe.transform(user), - email: user != null ? user.email : null, - organizationId: this.organization.id, - id: user != null ? user.id : null, - }, - }); + const changePasswordRefactorFlag = await this.configService.getFeatureFlag( + FeatureFlag.PM16117_ChangeExistingPasswordRefactor, + ); - const result = await lastValueFrom(dialogRef.closed); - if (result === ResetPasswordDialogResult.Ok) { - await this.load(); + if (changePasswordRefactorFlag) { + const dialogRef = AccountRecoveryDialogComponent.open(this.dialogService, { + data: { + name: this.userNamePipe.transform(user), + email: user != null ? user.email : null, + organizationId: this.organization.id, + id: user != null ? user.id : null, + }, + }); + + const result = await lastValueFrom(dialogRef.closed); + if (result === AccountRecoveryDialogResult.Ok) { + await this.load(); + } + } else { + const dialogRef = ResetPasswordComponent.open(this.dialogService, { + data: { + name: this.userNamePipe.transform(user), + email: user != null ? user.email : null, + organizationId: this.organization.id, + id: user != null ? user.id : null, + }, + }); + + const result = await lastValueFrom(dialogRef.closed); + if (result === ResetPasswordDialogResult.Ok) { + await this.load(); + } } } diff --git a/libs/auth/src/angular/input-password/input-password.component.html b/libs/auth/src/angular/input-password/input-password.component.html index aa23e8b5880..b5a9f5a56e9 100644 --- a/libs/auth/src/angular/input-password/input-password.component.html +++ b/libs/auth/src/angular/input-password/input-password.component.html @@ -40,22 +40,22 @@ type="password" formControlName="newPassword" /> - - - - + +