[PR #6123] [MERGED] [PM-27119] Prevent import card data when ITEM_RESTRICT_TYPES policy is active #32344

Closed
opened 2026-04-18 15:44:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6123
Author: @aj-rosado
Created: 11/5/2025
Status: Merged
Merged: 11/11/2025
Merged by: @aj-rosado

Base: mainHead: PM-27119/cxp-prevent-card-item-imported-item-restricted-policy


📝 Commits (8)

  • 300d5f7 Filtering card types if user has an ITEM_RESTRICTED org policy
  • 020aa85 improved card-type test scenario on CredentialExchangeImportManagerTest
  • 7aa4d68 filter out cards after vaultSdkSource.importCxf result when RESTRICT_ITEM_TYPE policy is active
  • c24f1fd only ask for cards if RESTRICT_ITEM_TYPES policy is not active
  • d795d51 Merge branch 'main' into PM-27119/cxp-prevent-card-item-imported-item-restricted-policy
  • d9a4dbf Created PolicyManager helper method to check if hasRestrictedItemTypes policy is active
  • 696e773 fixed exportvaultviewmodel test
  • 0995f1e removed unnecessary suppress to MaxLineLength

📊 Changes

8 files changed (+299 additions, -25 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/util/PolicyManagerExtensions.kt (+6 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerImpl.kt (+17 -4)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/di/VaultManagerModule.kt (+3 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultViewModel.kt (+2 -4)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModel.kt (+24 -16)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerTest.kt (+191 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultViewModelTest.kt (+1 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModelTest.kt (+55 -0)

📄 Description

🎟️ Tracking

📔 Objective

If the user has active ITEM_RESTRICTION policies.

Will not request card types from other password managers
If the data still contains card data, this will filter the card types out of the import if the importing data

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6123 **Author:** [@aj-rosado](https://github.com/aj-rosado) **Created:** 11/5/2025 **Status:** ✅ Merged **Merged:** 11/11/2025 **Merged by:** [@aj-rosado](https://github.com/aj-rosado) **Base:** `main` ← **Head:** `PM-27119/cxp-prevent-card-item-imported-item-restricted-policy` --- ### 📝 Commits (8) - [`300d5f7`](https://github.com/bitwarden/android/commit/300d5f720a11f31dc46a385566027cbd6ac73c85) Filtering card types if user has an ITEM_RESTRICTED org policy - [`020aa85`](https://github.com/bitwarden/android/commit/020aa856b93476ee4b6163c6cc6bcbbb0b030744) improved card-type test scenario on CredentialExchangeImportManagerTest - [`7aa4d68`](https://github.com/bitwarden/android/commit/7aa4d68d65385e517744e2daa44f682311ea0e48) filter out cards after vaultSdkSource.importCxf result when RESTRICT_ITEM_TYPE policy is active - [`c24f1fd`](https://github.com/bitwarden/android/commit/c24f1fd1447fdd3357c568bc0c70027788f1a9c7) only ask for cards if RESTRICT_ITEM_TYPES policy is not active - [`d795d51`](https://github.com/bitwarden/android/commit/d795d515651c367fadbc36ef121c7f3e95e4831c) Merge branch 'main' into PM-27119/cxp-prevent-card-item-imported-item-restricted-policy - [`d9a4dbf`](https://github.com/bitwarden/android/commit/d9a4dbf01c12843be22063a1b54035aeeff71d36) Created PolicyManager helper method to check if hasRestrictedItemTypes policy is active - [`696e773`](https://github.com/bitwarden/android/commit/696e7734c7ed01cb5c369fee41c659b6a61dd3ef) fixed exportvaultviewmodel test - [`0995f1e`](https://github.com/bitwarden/android/commit/0995f1e77076b08b68ed7a18fdae9135081e827b) removed unnecessary suppress to MaxLineLength ### 📊 Changes **8 files changed** (+299 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/platform/manager/util/PolicyManagerExtensions.kt` (+6 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerImpl.kt` (+17 -4) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/di/VaultManagerModule.kt` (+3 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultViewModel.kt` (+2 -4) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModel.kt` (+24 -16) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerTest.kt` (+191 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultViewModelTest.kt` (+1 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModelTest.kt` (+55 -0) </details> ### 📄 Description ## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective If the user has active ITEM_RESTRICTION policies. Will not request card types from other password managers If the data still contains card data, this will filter the card types out of the import if the importing data ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-18 15:44:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#32344