MSP-1658 /user/get_profile returning 401 for blocked users
This commit is contained in:
1 parent
0877e05811
commit
60fc5d9170
2 files changed
+3
-1
No files matched your search
+1
-1
@@ -52,7 +52,7 @@ func (u User) GetProfileById(ctx context.Context, userId int64) (*domain.AdminUs
|
||||
return nil, errors.WithMessagef(err, "get user by id: %d", userId)
|
||||
}
|
||||
if user.Blocked {
|
||||
return nil, errors.Errorf("user is blocked")
|
||||
return nil, errors.WithMessagef(domain.ErrUnauthenticated, "user '%d' is blocked", user.Id)
|
||||
}
|
||||
|
||||
role, err := u.userRoleRepo.GetRoleById(ctx, user.RoleId)
|
||||
|
||||
Reference in new issue
Block a user