fix: enforce 2fa only on certain update actions

prevent newer admins from demoting older admins, and also prevent deletion of all admins
This commit is contained in:
2026-04-25 05:02:31 -04:00
parent e20a6200dd
commit a55268afdc
2 changed files with 41 additions and 21 deletions
@@ -30,7 +30,6 @@ namespace SharpbinV3.Server.Services
IOptions<JWTSettings> jwtOptions,
IOptions<AuthSettings> authOptions,
IOptions<AppSettings> appSettings,
IOptions<EmailSettings> emailSettings,
ILogger<AuthService> logger
)
{
@@ -39,7 +38,6 @@ namespace SharpbinV3.Server.Services
private readonly JWTSettings _jwtSettings = jwtOptions.Value;
private readonly AuthSettings _authSettings = authOptions.Value;
private readonly AppSettings _appSettings = appSettings.Value;
private readonly EmailSettings _emailSettings = emailSettings.Value;
private readonly ILogger _logger = logger;
private const int EmailVerificationTokenLength = 64;