// Check if the role has already been assigned to the user
if (roleRepo.getByNameAndUsersId(roleName, user.getId()) == null) {
// Role hasn't been assigned, so do it
user.getRoles().add(role);
role.getUsers().add(user);
userRepo.save(user);
roleRepo.save(role);
}
}
/**