1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 04:03:29 +00:00

[Account Recovery][PM-18721] catch missing user details client-side

This commit is contained in:
rr-bw
2025-06-03 13:33:53 -07:00
parent 45f8c19222
commit 1ae47e41e8
2 changed files with 17 additions and 5 deletions

View File

@@ -95,7 +95,6 @@ class MembersTableDataSource extends PeopleTableDataSource<OrganizationUserView>
@Component({
templateUrl: "members.component.html",
standalone: false,
})
export class MembersComponent extends BaseMembersComponent<OrganizationUserView> {
userType = OrganizationUserType;
@@ -747,13 +746,23 @@ 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) {
const dialogRef = AccountRecoveryDialogComponent.open(this.dialogService, {
data: {
name: this.userNamePipe.transform(user),
email: user != null ? user.email : null,
email: user.email,
organizationId: this.organization.id as OrganizationId,
organizationUserId: user != null ? user.id : null,
organizationUserId: user.id,
},
});
@@ -768,9 +777,9 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
const dialogRef = ResetPasswordComponent.open(this.dialogService, {
data: {
name: this.userNamePipe.transform(user),
email: user != null ? user.email : null,
email: user.email,
organizationId: this.organization.id as OrganizationId,
id: user != null ? user.id : null,
id: user.id,
},
});

View File

@@ -2213,6 +2213,9 @@
"disable": {
"message": "Turn off"
},
"orgUserDetailsNotFound": {
"message": "Org user details not found"
},
"revokeAccess": {
"message": "Revoke access"
},