feat(account): add deletion lifecycle
This commit is contained in:
@@ -196,7 +196,7 @@ public sealed class TwoFactorController : ControllerBase
|
||||
if (session is null) return Unauthorized();
|
||||
|
||||
var user = await _users.FindByIdAsync(session.UserId);
|
||||
if (user is null || !user.TwoFactorEnabled || string.IsNullOrWhiteSpace(user.TotpSecretEncrypted))
|
||||
if (user is null || user.DeletionStatus != AccountDeletionStatuses.Active || !user.TwoFactorEnabled || string.IsNullOrWhiteSpace(user.TotpSecretEncrypted))
|
||||
{
|
||||
return Unauthorized();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user