1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

[SM-771] bulk add SM dialog (#5669)

* add dialog; add service method; add menu button

* update service layer

* update service method; add i18n; add success and error logic

* remove comment

* remove SM Beta copy in member dialog

* refactor error logic to utilize bitAction

* update i18n key

* use i18n in menu option

* use i18n in footer

* rename component file

* rename enableAccess method; remove button; use userName pipe

* only show if SM flag is enabled

* [SM-830] fix: close checkboxes on dialog close
This commit is contained in:
Will Martin
2023-06-29 12:42:27 -04:00
committed by GitHub
parent e615a2cd09
commit 3b1860b9ee
9 changed files with 184 additions and 7 deletions

View File

@@ -201,6 +201,17 @@ export abstract class OrganizationUserService {
request: OrganizationUserResetPasswordRequest
): Promise<void>;
/**
* Enable Secrets Manager for many users
* @param organizationId - Identifier for the organization the user belongs to
* @param ids - List of organization user identifiers to enable
* @return List of user ids, including both those that were successfully enabled and those that had an error
*/
abstract putOrganizationUserBulkEnableSecretsManager(
organizationId: string,
ids: string[]
): Promise<ListResponse<OrganizationUserBulkResponse>>;
/**
* Delete an organization user
* @param organizationId - Identifier for the organization the user belongs to

View File

@@ -206,6 +206,20 @@ export class OrganizationUserServiceImplementation implements OrganizationUserSe
return new ListResponse(r, OrganizationUserBulkResponse);
}
async putOrganizationUserBulkEnableSecretsManager(
organizationId: string,
ids: string[]
): Promise<ListResponse<OrganizationUserBulkResponse>> {
const r = await this.apiService.send(
"PUT",
"/organizations/" + organizationId + "/users/enable-secrets-manager",
new OrganizationUserBulkRequest(ids),
true,
true
);
return new ListResponse(r, OrganizationUserBulkResponse);
}
putOrganizationUser(
organizationId: string,
id: string,