mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Add bulk user delete functionality to members component
This commit is contained in:
@@ -137,6 +137,12 @@
|
|||||||
{{ "remove" | i18n }}
|
{{ "remove" | i18n }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" bitMenuItem (click)="bulkDelete()">
|
||||||
|
<span class="tw-text-danger">
|
||||||
|
<i aria-hidden="true" class="bwi bwi-trash"></i>
|
||||||
|
{{ "delete" | i18n }}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</bit-menu>
|
</bit-menu>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ import { OrganizationUserView } from "../core/views/organization-user.view";
|
|||||||
import { openEntityEventsDialog } from "../manage/entity-events.component";
|
import { openEntityEventsDialog } from "../manage/entity-events.component";
|
||||||
|
|
||||||
import { BulkConfirmDialogComponent } from "./components/bulk/bulk-confirm-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";
|
import { BulkEnableSecretsManagerDialogComponent } from "./components/bulk/bulk-enable-sm-dialog.component";
|
||||||
import { BulkRemoveDialogComponent } from "./components/bulk/bulk-remove-dialog.component";
|
import { BulkRemoveDialogComponent } from "./components/bulk/bulk-remove-dialog.component";
|
||||||
import { BulkRestoreRevokeComponent } from "./components/bulk/bulk-restore-revoke.component";
|
import { BulkRestoreRevokeComponent } from "./components/bulk/bulk-restore-revoke.component";
|
||||||
@@ -552,6 +553,21 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
|
|||||||
await this.load();
|
await this.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async bulkDelete() {
|
||||||
|
if (this.actionPromise != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const dialogRef = BulkDeleteDialogComponent.open(this.dialogService, {
|
||||||
|
data: {
|
||||||
|
organizationId: this.organization.id,
|
||||||
|
users: this.dataSource.getCheckedUsers(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
await lastValueFrom(dialogRef.closed);
|
||||||
|
await this.load();
|
||||||
|
}
|
||||||
|
|
||||||
async bulkRevoke() {
|
async bulkRevoke() {
|
||||||
await this.bulkRevokeOrRestore(true);
|
await this.bulkRevokeOrRestore(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user