[PR #2648] [PM-3227] Avoid clone on discoverable passkeys. #3705

Closed
opened 2025-11-26 23:36:20 -06:00 by GiteaMirror · 0 comments
Owner

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

State: closed
Merged: Yes


Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Avoid ability to clone on discoverable passkeys.

Code changes

  • CipherDetailsPage.xaml.cs: Remove "Clone" ability on the iOS menu when cipher is a discoverable passkey. Also, refactor a bit the code to be more clean and readable.
  • CipherDetailsPageViewModel: Added CanClone to improve readability and have a centralized point for its logic. Also, added a safe check on the clone execution not to allow cloning a discoverable passkey in case something on the UI fails.
  • CipherView: Added IsClonable to know whether the cipher can be cloned or not.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
**Original Pull Request:** https://github.com/bitwarden/android/pull/2648 **State:** closed **Merged:** Yes --- ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Avoid ability to clone on discoverable passkeys. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **CipherDetailsPage.xaml.cs:** Remove "Clone" ability on the iOS menu when cipher is a discoverable passkey. Also, refactor a bit the code to be more clean and readable. * **CipherDetailsPageViewModel:** Added `CanClone` to improve readability and have a centralized point for its logic. Also, added a safe check on the clone execution not to allow cloning a discoverable passkey in case something on the UI fails. * **CipherView:** Added `IsClonable` to know whether the cipher can be cloned or not. ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team
GiteaMirror added the pull-request label 2025-11-26 23:36:20 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3705