From 5d78b1684d300d6860b36fed11fb256cfee840da Mon Sep 17 00:00:00 2001 From: Philip Cappelli <150719757+phil-livefront@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:09:40 -0400 Subject: [PATCH] PM-9001 - Item with MP Reprompt does not prompt for MP when downloading attachment (#764) --- .../UI/Vault/VaultItem/ViewItem/ViewItemAction.swift | 2 +- .../UI/Vault/VaultItem/ViewItem/ViewItemActionTests.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemAction.swift b/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemAction.swift index 386a35c49..bfa1e2b12 100644 --- a/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemAction.swift +++ b/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemAction.swift @@ -46,6 +46,7 @@ enum ViewItemAction: Equatable { switch self { case .cardItemAction, .customFieldVisibilityPressed, + .downloadAttachment, .editPressed, .morePressed, .passwordVisibilityPressed: @@ -53,7 +54,6 @@ enum ViewItemAction: Equatable { case let .copyPressed(_, field): field.requiresMasterPasswordReprompt case .dismissPressed, - .downloadAttachment, .passwordHistoryPressed, .toastShown: false diff --git a/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemActionTests.swift b/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemActionTests.swift index 6761670ca..09d6d5c3a 100644 --- a/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemActionTests.swift +++ b/BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemActionTests.swift @@ -38,7 +38,7 @@ class ViewItemActionTests: BitwardenTestCase { XCTAssertFalse(ViewItemAction.dismissPressed.requiresMasterPasswordReprompt) - XCTAssertFalse(ViewItemAction.downloadAttachment(.fixture()).requiresMasterPasswordReprompt) + XCTAssertTrue(ViewItemAction.downloadAttachment(.fixture()).requiresMasterPasswordReprompt) XCTAssertTrue(ViewItemAction.editPressed.requiresMasterPasswordReprompt)