1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00

Remove block legacy users feature flag (#5212)

This commit is contained in:
Bernd Schoolmann 2025-01-10 11:55:40 +01:00 committed by GitHub
parent ce2ecf9da0
commit 8a68f075cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 8 deletions

View File

@ -115,7 +115,6 @@ public static class FeatureFlagKeys
public const string PM4154BulkEncryptionService = "PM-4154-bulk-encryption-service"; public const string PM4154BulkEncryptionService = "PM-4154-bulk-encryption-service";
public const string VaultBulkManagementAction = "vault-bulk-management-action"; public const string VaultBulkManagementAction = "vault-bulk-management-action";
public const string MemberAccessReport = "ac-2059-member-access-report"; public const string MemberAccessReport = "ac-2059-member-access-report";
public const string BlockLegacyUsers = "block-legacy-users";
public const string InlineMenuFieldQualification = "inline-menu-field-qualification"; public const string InlineMenuFieldQualification = "inline-menu-field-qualification";
public const string TwoFactorComponentRefactor = "two-factor-component-refactor"; public const string TwoFactorComponentRefactor = "two-factor-component-refactor";
public const string InlineMenuPositioningImprovements = "inline-menu-positioning-improvements"; public const string InlineMenuPositioningImprovements = "inline-menu-positioning-improvements";

View File

@ -183,14 +183,11 @@ public abstract class BaseRequestValidator<T> where T : class
} }
// 5. Force legacy users to the web for migration // 5. Force legacy users to the web for migration
if (FeatureService.IsEnabled(FeatureFlagKeys.BlockLegacyUsers))
{
if (UserService.IsLegacyUser(user) && request.ClientId != "web") if (UserService.IsLegacyUser(user) && request.ClientId != "web")
{ {
await FailAuthForLegacyUserAsync(user, context); await FailAuthForLegacyUserAsync(user, context);
return; return;
} }
}
await BuildSuccessResultAsync(user, context, validatorContext.Device, returnRememberMeToken); await BuildSuccessResultAsync(user, context, validatorContext.Device, returnRememberMeToken);
} }

View File

@ -369,7 +369,6 @@ public class BaseRequestValidatorTests
context.CustomValidatorRequestContext.CaptchaResponse.IsBot = false; context.CustomValidatorRequestContext.CaptchaResponse.IsBot = false;
context.ValidatedTokenRequest.ClientId = "Not Web"; context.ValidatedTokenRequest.ClientId = "Not Web";
_sut.isValid = true; _sut.isValid = true;
_featureService.IsEnabled(FeatureFlagKeys.BlockLegacyUsers).Returns(true);
_twoFactorAuthenticationValidator _twoFactorAuthenticationValidator
.RequiresTwoFactorAsync(Arg.Any<User>(), Arg.Any<ValidatedTokenRequest>()) .RequiresTwoFactorAsync(Arg.Any<User>(), Arg.Any<ValidatedTokenRequest>())
.Returns(Task.FromResult(new Tuple<bool, Organization>(false, null))); .Returns(Task.FromResult(new Tuple<bool, Organization>(false, null)));