mirror of
https://github.com/bitwarden/browser
synced 2026-02-07 04:03:29 +00:00
[Account Recovery][PM-18721] move error handling within flag, and revert changes that leaked outside of flag
This commit is contained in:
@@ -86,7 +86,7 @@ export abstract class BaseMembersComponent<UserView extends UserViewTypes> {
|
||||
protected i18nService: I18nService,
|
||||
protected keyService: KeyService,
|
||||
protected validationService: ValidationService,
|
||||
private logService: LogService,
|
||||
protected logService: LogService,
|
||||
protected userNamePipe: UserNamePipe,
|
||||
protected dialogService: DialogService,
|
||||
protected organizationManagementPreferencesService: OrganizationManagementPreferencesService,
|
||||
|
||||
@@ -746,17 +746,18 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
|
||||
FeatureFlag.PM16117_ChangeExistingPasswordRefactor,
|
||||
);
|
||||
|
||||
if (!user || !user.email || !user.id) {
|
||||
this.toastService.showToast({
|
||||
variant: "error",
|
||||
title: this.i18nService.t("errorOccurred"),
|
||||
message: this.i18nService.t("orgUserDetailsNotFound"),
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (changePasswordRefactorFlag) {
|
||||
if (!user || !user.email || !user.id) {
|
||||
this.toastService.showToast({
|
||||
variant: "error",
|
||||
title: this.i18nService.t("errorOccurred"),
|
||||
message: this.i18nService.t("orgUserDetailsNotFound"),
|
||||
});
|
||||
this.logService.error("Org user details not found when attempting account recovery");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const dialogRef = AccountRecoveryDialogComponent.open(this.dialogService, {
|
||||
data: {
|
||||
name: this.userNamePipe.transform(user),
|
||||
@@ -777,9 +778,9 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
|
||||
const dialogRef = ResetPasswordComponent.open(this.dialogService, {
|
||||
data: {
|
||||
name: this.userNamePipe.transform(user),
|
||||
email: user.email,
|
||||
email: user != null ? user.email : null,
|
||||
organizationId: this.organization.id as OrganizationId,
|
||||
id: user.id,
|
||||
id: user != null ? user.id : null,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user