1
0
mirror of https://github.com/bitwarden/server synced 2025-12-31 15:43:16 +00:00

[PM-29161] Remove ReturnErrorOnExistingKeypair feature flag (#6726)

* Remove feature flag

* Add unit test coverage
This commit is contained in:
Thomas Avery
2025-12-15 13:52:34 -06:00
committed by GitHub
parent 7cfdb4ddfc
commit 3c44430979
3 changed files with 35 additions and 10 deletions

View File

@@ -436,12 +436,9 @@ public class AccountsController : Controller
throw new UnauthorizedAccessException();
}
if (_featureService.IsEnabled(FeatureFlagKeys.ReturnErrorOnExistingKeypair))
if (!string.IsNullOrWhiteSpace(user.PrivateKey) || !string.IsNullOrWhiteSpace(user.PublicKey))
{
if (!string.IsNullOrWhiteSpace(user.PrivateKey) || !string.IsNullOrWhiteSpace(user.PublicKey))
{
throw new BadRequestException("User has existing keypair");
}
throw new BadRequestException("User has existing keypair");
}
if (model.AccountKeys != null)

View File

@@ -198,7 +198,6 @@ public static class FeatureFlagKeys
public const string PM28265_ReconcileAdditionalStorageJobEnableLiveMode = "pm-28265-reconcile-additional-storage-job-enable-live-mode";
/* Key Management Team */
public const string ReturnErrorOnExistingKeypair = "return-error-on-existing-keypair";
public const string PrivateKeyRegeneration = "pm-12241-private-key-regeneration";
public const string Argon2Default = "argon2-default";
public const string SSHKeyItemVaultItem = "ssh-key-vault-item";