mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[PM-18322] Fix: Allow organization admins to upload attachments for items without direct access (#14361)
* Wire organization ID into AttachmentsV2Component for org-based ciphers * Enhance AttachmentsV2Component to accept organization ID for improved handling of org-based ciphers * Integrate organization ID into VaultComponent for AttachmentsV2Component to enhance org-based cipher handling * Add unit tests for CipherAttachmentsComponent to validate attachment saving behavior for admins - Introduced mocks for ApiService and OrganizationService in the test setup. - Updated tests to check `saveAttachmentWithServer` calls with the correct parameters, including an `isAdmin` flag for admin API usage. * Fix unit tests for AttachmentsV2Component by adding mocks for ApiService and OrganizationService * Fix AttachmentsV2Component tests
This commit is contained in:
@@ -809,6 +809,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
|
||||
const dialogRef = AttachmentsV2Component.open(this.dialogService, {
|
||||
cipherId: cipher.id as CipherId,
|
||||
organizationId: cipher.organizationId as OrganizationId,
|
||||
});
|
||||
|
||||
const result = await firstValueFrom(dialogRef.closed);
|
||||
|
||||
Reference in New Issue
Block a user