mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
[AC-2304] added User Status check to revoke-restore as well as remove components (#8347)
This commit is contained in:
parent
161fb1da5d
commit
65534a1323
@ -2,6 +2,7 @@ import { Component, Input } from "@angular/core";
|
|||||||
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service";
|
||||||
|
import { OrganizationUserStatusType } from "@bitwarden/common/admin-console/enums";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
|
|
||||||
import { BulkUserDetails } from "./bulk-status.component";
|
import { BulkUserDetails } from "./bulk-status.component";
|
||||||
@ -14,7 +15,9 @@ export class BulkRemoveComponent {
|
|||||||
@Input() organizationId: string;
|
@Input() organizationId: string;
|
||||||
@Input() set users(value: BulkUserDetails[]) {
|
@Input() set users(value: BulkUserDetails[]) {
|
||||||
this._users = value;
|
this._users = value;
|
||||||
this.showNoMasterPasswordWarning = this._users.some((u) => u.hasMasterPassword === false);
|
this.showNoMasterPasswordWarning = this._users.some(
|
||||||
|
(u) => u.status > OrganizationUserStatusType.Invited && u.hasMasterPassword === false,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get users(): BulkUserDetails[] {
|
get users(): BulkUserDetails[] {
|
||||||
|
@ -2,6 +2,7 @@ import { DIALOG_DATA } from "@angular/cdk/dialog";
|
|||||||
import { Component, Inject } from "@angular/core";
|
import { Component, Inject } from "@angular/core";
|
||||||
|
|
||||||
import { OrganizationUserService } from "@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service";
|
||||||
|
import { OrganizationUserStatusType } from "@bitwarden/common/admin-console/enums";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@ -37,7 +38,9 @@ export class BulkRestoreRevokeComponent {
|
|||||||
this.isRevoking = data.isRevoking;
|
this.isRevoking = data.isRevoking;
|
||||||
this.organizationId = data.organizationId;
|
this.organizationId = data.organizationId;
|
||||||
this.users = data.users;
|
this.users = data.users;
|
||||||
this.showNoMasterPasswordWarning = this.users.some((u) => u.hasMasterPassword === false);
|
this.showNoMasterPasswordWarning = this.users.some(
|
||||||
|
(u) => u.status > OrganizationUserStatusType.Invited && u.hasMasterPassword === false,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get bulkTitle() {
|
get bulkTitle() {
|
||||||
|
Loading…
Reference in New Issue
Block a user