@@ -64,6 +64,10 @@ import { GroupApiService } from "../core";
64
64
import { OrganizationUserView } from "../core/views/organization-user.view" ;
65
65
import { openEntityEventsDialog } from "../manage/entity-events.component" ;
66
66
67
+ import {
68
+ AccountRecoveryDialogComponent ,
69
+ AccountRecoveryDialogResult ,
70
+ } from "./components/account-recovery/account-recovery-dialog.component" ;
67
71
import { BulkConfirmDialogComponent } from "./components/bulk/bulk-confirm-dialog.component" ;
68
72
import { BulkDeleteDialogComponent } from "./components/bulk/bulk-delete-dialog.component" ;
69
73
import { BulkEnableSecretsManagerDialogComponent } from "./components/bulk/bulk-enable-sm-dialog.component" ;
@@ -719,18 +723,38 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
719
723
}
720
724
721
725
async resetPassword ( user : OrganizationUserView ) {
722
- const dialogRef = ResetPasswordComponent . open ( this . dialogService , {
723
- data : {
724
- name : this . userNamePipe . transform ( user ) ,
725
- email : user != null ? user . email : null ,
726
- organizationId : this . organization . id ,
727
- id : user != null ? user . id : null ,
728
- } ,
729
- } ) ;
726
+ const changePasswordRefactorFlag = await this . configService . getFeatureFlag (
727
+ FeatureFlag . PM16117_ChangeExistingPasswordRefactor ,
728
+ ) ;
730
729
731
- const result = await lastValueFrom ( dialogRef . closed ) ;
732
- if ( result === ResetPasswordDialogResult . Ok ) {
733
- await this . load ( ) ;
730
+ if ( changePasswordRefactorFlag ) {
731
+ const dialogRef = AccountRecoveryDialogComponent . open ( this . dialogService , {
732
+ data : {
733
+ name : this . userNamePipe . transform ( user ) ,
734
+ email : user != null ? user . email : null ,
735
+ organizationId : this . organization . id ,
736
+ id : user != null ? user . id : null ,
737
+ } ,
738
+ } ) ;
739
+
740
+ const result = await lastValueFrom ( dialogRef . closed ) ;
741
+ if ( result === AccountRecoveryDialogResult . Ok ) {
742
+ await this . load ( ) ;
743
+ }
744
+ } else {
745
+ const dialogRef = ResetPasswordComponent . open ( this . dialogService , {
746
+ data : {
747
+ name : this . userNamePipe . transform ( user ) ,
748
+ email : user != null ? user . email : null ,
749
+ organizationId : this . organization . id ,
750
+ id : user != null ? user . id : null ,
751
+ } ,
752
+ } ) ;
753
+
754
+ const result = await lastValueFrom ( dialogRef . closed ) ;
755
+ if ( result === ResetPasswordDialogResult . Ok ) {
756
+ await this . load ( ) ;
757
+ }
734
758
}
735
759
}
736
760
0 commit comments