mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
[AC-1344] Provider users unable to bulk restore vault items for client organizations (#5259)
* [AC-1344] Simplified DeleteMany and SoftDeleteMany request creation * [AC-1344] Added method putRestoreManyCiphersAdmin to apiService * [AC-1344] Added method restoreManyWithServer to cipherService * [AC-1344] Rewrote if statements and changed the method return type
This commit is contained in:
@@ -133,6 +133,7 @@ import { Utils } from "../platform/misc/utils";
|
||||
import { AttachmentRequest } from "../vault/models/request/attachment.request";
|
||||
import { CipherBulkDeleteRequest } from "../vault/models/request/cipher-bulk-delete.request";
|
||||
import { CipherBulkMoveRequest } from "../vault/models/request/cipher-bulk-move.request";
|
||||
import { CipherBulkRestoreRequest } from "../vault/models/request/cipher-bulk-restore.request";
|
||||
import { CipherBulkShareRequest } from "../vault/models/request/cipher-bulk-share.request";
|
||||
import { CipherCollectionsRequest } from "../vault/models/request/cipher-collections.request";
|
||||
import { CipherCreateRequest } from "../vault/models/request/cipher-create.request";
|
||||
@@ -614,12 +615,19 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
}
|
||||
|
||||
async putRestoreManyCiphers(
|
||||
request: CipherBulkDeleteRequest
|
||||
request: CipherBulkRestoreRequest
|
||||
): Promise<ListResponse<CipherResponse>> {
|
||||
const r = await this.send("PUT", "/ciphers/restore", request, true, true);
|
||||
return new ListResponse<CipherResponse>(r, CipherResponse);
|
||||
}
|
||||
|
||||
async putRestoreManyCiphersAdmin(
|
||||
request: CipherBulkRestoreRequest
|
||||
): Promise<ListResponse<CipherResponse>> {
|
||||
const r = await this.send("PUT", "/ciphers/restore-admin", request, true, true);
|
||||
return new ListResponse<CipherResponse>(r, CipherResponse);
|
||||
}
|
||||
|
||||
// Attachments APIs
|
||||
|
||||
async getAttachmentData(
|
||||
|
||||
Reference in New Issue
Block a user