[PR #6220] [MERGED] [PM-27118] Restrict Credential Exchange import based on Personal Ownership policy #48011

Closed
opened 2026-04-26 15:32:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6220
Author: @SaintPatrck
Created: 12/2/2025
Status: Merged
Merged: 12/3/2025
Merged by: @SaintPatrck

Base: mainHead: PM-27118/block-import-based-on-org-policies


📝 Commits (3)

  • 65c3c88 [PM-27118] Restrict Credential Exchange import based on Personal Ownership policy
  • 324da41 Rename private method in VaultSettingsViewModel
  • 1613de9 Move every statements outside of turbine scope

📊 Changes

2 files changed (+65 additions, -10 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/vault/VaultSettingsViewModel.kt (+20 -8)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/vault/VaultSettingsViewModelTest.kt (+45 -2)

📄 Description

🎟️ Tracking

PM-27118

📔 Objective

Update the import logic in VaultSettingsViewModel to respect the Personal Ownership policy. When this policy is active, the application will now hide the Credential Exchange import UI indicators (chevron) and route users to the legacy vault import screen, even if the Credential Exchange feature flag is enabled.

  • Inject PolicyManager into VaultSettingsViewModel.
  • Update the logic determining showImportItemsChevron to require both the CredentialExchangeProtocolImport flag to be enabled and the PERSONAL_OWNERSHIP policy list to be empty.
  • Modify handleImportItemsClicked to check for active Personal Ownership policies; if present, navigate to NavigateToImportVault instead of NavigateToImportItems.
  • Rename the internal action ImportFeatureUpdated to CredentialExchangeAvailabilityChanged.
  • Add unit tests in VaultSettingsViewModelTest to verify correct navigation and UI state behavior when policies are present or absent.

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/6220 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 12/2/2025 **Status:** ✅ Merged **Merged:** 12/3/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-27118/block-import-based-on-org-policies` --- ### 📝 Commits (3) - [`65c3c88`](https://github.com/bitwarden/android/commit/65c3c889b5f8dc611d9be71ccd6e0da335ad8d24) [PM-27118] Restrict Credential Exchange import based on Personal Ownership policy - [`324da41`](https://github.com/bitwarden/android/commit/324da41f5d744bfa3671104718b8c8630ad5f11c) Rename private method in VaultSettingsViewModel - [`1613de9`](https://github.com/bitwarden/android/commit/1613de98b14f6cdd678526c9ad11da6628c1a8b1) Move `every` statements outside of turbine scope ### 📊 Changes **2 files changed** (+65 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/vault/VaultSettingsViewModel.kt` (+20 -8) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/vault/VaultSettingsViewModelTest.kt` (+45 -2) </details> ### 📄 Description ## 🎟️ Tracking PM-27118 ## 📔 Objective Update the import logic in `VaultSettingsViewModel` to respect the Personal Ownership policy. When this policy is active, the application will now hide the Credential Exchange import UI indicators (chevron) and route users to the legacy vault import screen, even if the Credential Exchange feature flag is enabled. - Inject `PolicyManager` into `VaultSettingsViewModel`. - Update the logic determining `showImportItemsChevron` to require both the `CredentialExchangeProtocolImport` flag to be enabled and the `PERSONAL_OWNERSHIP` policy list to be empty. - Modify `handleImportItemsClicked` to check for active Personal Ownership policies; if present, navigate to `NavigateToImportVault` instead of `NavigateToImportItems`. - Rename the internal action `ImportFeatureUpdated` to `CredentialExchangeAvailabilityChanged`. - Add unit tests in `VaultSettingsViewModelTest` to verify correct navigation and UI state behavior when policies are present or absent. ## ⏰ 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-26 15:32:57 -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#48011