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:
@@ -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>;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user