mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 09:06:33 +00:00
[AZ-198] Block disabled user login
Made-with: Cursor
This commit is contained in:
@@ -63,6 +63,9 @@ public class UserService(IDbFactory dbFactory, ICache cache) : IUserService
|
||||
if (request.Password.ToHash() != user.PasswordHash)
|
||||
throw new BusinessException(ExceptionEnum.WrongPassword);
|
||||
|
||||
if (!user.IsEnabled)
|
||||
throw new BusinessException(ExceptionEnum.UserDisabled);
|
||||
|
||||
return user;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user