diff --git a/Yes.Application/Admins/Users/UpdateUserCommandHandler.cs b/Yes.Application/Admins/Users/UpdateUserCommandHandler.cs index dafc391..90603b9 100644 --- a/Yes.Application/Admins/Users/UpdateUserCommandHandler.cs +++ b/Yes.Application/Admins/Users/UpdateUserCommandHandler.cs @@ -31,6 +31,12 @@ { throw new UserNotExistsException(request.Id); } + if (user.IsSystemUser()) + { + throw new AccessDeniedException(); + } + + user.Update(request.Name, request.Email, request.NickName, request.Password); _db.Users.Update(user); await _db.SaveChangesAsync();