Skip to content

[PM-2378] Display error toast on duplicate Passkey when moving cipher to an organization#2594

Merged
fedemkr merged 4 commits intoPM-1575-display-passkeysfrom
PM-2378-handle-duplicate-passkey-on-moving-item-to-org
Jul 24, 2023
Merged

[PM-2378] Display error toast on duplicate Passkey when moving cipher to an organization#2594
fedemkr merged 4 commits intoPM-1575-display-passkeysfrom
PM-2378-handle-duplicate-passkey-on-moving-item-to-org

Conversation

@fedemkr
Copy link
Member

@fedemkr fedemkr commented Jun 29, 2023

Type of change

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

Objective

Display error toast on duplicate passkey when moving item to an organization.

Code changes

  • SharePageViewModel: Added check of duplicate passkey error and show the toast to the user in that case
  • ICipherService: Added ShareWithServerError to return the appropriate response to the caller when sharing cipher to an org. I cannot throw an ApiException with the error inside given that AppResources is not available in the Core project. Also another way would be to create and throw a specific exception for this and handle it on the caller but I thought this was better and the caller can handle the different paths more directly.
  • CipherService: Added the validation to check whether the cipher has a FIdo2Key and if so, check if the organization already has any ciphers with the same RpId (duplicate passkey) to return an error if that's the case.

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

@fedemkr fedemkr requested review from a team June 29, 2023 21:18
@fedemkr fedemkr changed the title PM-2378 Display error toast if there is a duplicate passkey when movi… [PM-2378] Display error toast on duplicate Passkey when moving cipher to an organization Jun 29, 2023
Copy link
Contributor

@mpbw2 mpbw2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ThisItemCannotBeSharedWithTheOrganizationBecauseThereIsOneAlreadyWithTheSamePasskey

perfect

fedemkr added 3 commits July 20, 2023 12:28
…-passkey-on-moving-item-to-org

# Conflicts:
#	src/App/Resources/AppResources.resx
… uniqueness should be taken into consideration on different passkeys types and also the Username (#2632)
…crypting a cipher which was causing the passkey to be removed when moving to an org (#2637)
@fedemkr fedemkr requested a review from mpbw2 July 21, 2023 18:49
</data>
<data name="EnterURI" xml:space="preserve">
<value>Enter URI</value>
</data>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URISaved is already declared above (line 2683)

@fedemkr fedemkr removed the needs-qa label Jul 24, 2023
@fedemkr fedemkr merged commit cb7bd0c into PM-1575-display-passkeys Jul 24, 2023
@fedemkr fedemkr deleted the PM-2378-handle-duplicate-passkey-on-moving-item-to-org branch July 24, 2023 16:05
fedemkr added a commit that referenced this pull request Jul 26, 2023
* PM-1575 Added new models for Fido2Key

* PM-1575 Added discoverable passkeys and WIP non-discoverable ones

* PM-1575 Fix format

* PM-1575 Added non-discoverable passkeys to login UI

* PM-1575 Added copy application icon to Fido2Key UI

* PM-1575 Updated bwi font with the updated passkey icon

* PM-1575 For now just display Available for two-step login on non-discoverable passkey inside of a cipher login

* PM-1575 Fix non-discoverable passkey visibility

* PM-1575 remove Passkeys as a filter in the vault list

* PM-1575 Display error toast if there is a duplicate passkey when moving a cipher to an org

* Revert "PM-1575 Display error toast if there is a duplicate passkey when moving a cipher to an org"

This reverts commit 78e6353.

* [PM-2378] Display error toast on duplicate Passkey when moving cipher to an organization (#2594)

* PM-2378 Display error toast if there is a duplicate passkey when moving a cipher to an org

* PM-3097 Fix issue when moving cipher with passkey to an org where the uniqueness should be taken into consideration on different passkeys types and also the Username (#2632)

* PM-3096 Fix non-discoverable passkey to be taken into account when encrypting a cipher which was causing the passkey to be removed when moving to an org (#2637)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants