[PR #6558] [PM-30916] bug: Create passkey myitems #12817

Closed
opened 2026-04-11 03:51:46 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/6558

State: closed
Merged: Yes


🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-30916

📔 Objective

Fixes a bug where users belonging to an organization with the PERSONAL_OWNERSHIP policy enabled could not create Passkeys into the MyItems (DEFAULT_USER_COLLECTION) collection.

Root Cause

Two issues were identified:

  1. toCipherView() in VaultAddItemStateExtensions.kt used originalCipher?.collectionIds.orEmpty() which returns an empty list for new items, ignoring the selected collection IDs from the UI state.
  2. saveCredential() in Fido2CredentialStoreImpl.kt always called createCipher() for new passkeys, which doesn't support organization collections. When PERSONAL_OWNERSHIP is enabled, ciphers must be created using
    createCipherInOrganization() with the appropriate collection IDs.

Changes

  • Updated toCipherView() to use selected collection IDs from the UI state when creating new items
  • Updated saveCredential() to use createCipherInOrganization() when the cipher belongs to an organization and has collection IDs
**Original Pull Request:** https://github.com/bitwarden/android/pull/6558 **State:** closed **Merged:** Yes --- ## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> https://bitwarden.atlassian.net/browse/PM-30916 ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> Fixes a bug where users belonging to an organization with the PERSONAL_OWNERSHIP policy enabled could not create Passkeys into the MyItems (DEFAULT_USER_COLLECTION) collection. **Root Cause** Two issues were identified: 1. toCipherView() in VaultAddItemStateExtensions.kt used originalCipher?.collectionIds.orEmpty() which returns an empty list for new items, ignoring the selected collection IDs from the UI state. 2. saveCredential() in Fido2CredentialStoreImpl.kt always called createCipher() for new passkeys, which doesn't support organization collections. When PERSONAL_OWNERSHIP is enabled, ciphers must be created using createCipherInOrganization() with the appropriate collection IDs. **Changes** - Updated toCipherView() to use selected collection IDs from the UI state when creating new items - Updated saveCredential() to use createCipherInOrganization() when the cipher belongs to an organization and has collection IDs
GiteaMirror added the pull-request label 2026-04-11 03:51:46 -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#12817