1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00

[PM-10323] Add delete option to managed members (#11655)

* Add managedByOrganization property to OrganizationUserUserDetailsResponse and OrganizationUserView

* Add managedByOrganization property to OrganizationUserDetailsResponse and OrganizationUserAdminView

* Add deleteOrganizationUser method to OrganizationUserApiService

* Add copy strings for organization user delete dialog

* Add copy string for organization user deleted toast

* Add delete organization user dialog component

* Add the option to delete managed organization users from the members list

* Refactor delete user confirmation dialog in MembersComponent to use DialogService

* Delete DeleteOrganizationUserDialogComponent

* Refactor delete button in member dialog component to change the icon and tooltip text to 'Remove'

* Add delete button to members dialog if the user is managed by the organization
This commit is contained in:
Rui Tomé
2024-11-04 16:19:30 +00:00
committed by GitHub
parent 2d0460eb15
commit d669d2003f
7 changed files with 134 additions and 1 deletions

View File

@@ -275,4 +275,11 @@ export abstract class OrganizationUserApiService {
organizationId: string,
ids: string[],
): Promise<ListResponse<OrganizationUserBulkResponse>>;
/**
* Remove an organization user's access to the organization and delete their account data
* @param organizationId - Identifier for the organization the user belongs to
* @param id - Organization user identifier
*/
abstract deleteOrganizationUser(organizationId: string, id: string): Promise<void>;
}

View File

@@ -359,4 +359,14 @@ export class DefaultOrganizationUserApiService implements OrganizationUserApiSer
);
return new ListResponse(r, OrganizationUserBulkResponse);
}
deleteOrganizationUser(organizationId: string, id: string): Promise<void> {
return this.apiService.send(
"DELETE",
"/organizations/" + organizationId + "/users/" + id + "/delete-account",
null,
true,
false,
);
}
}