Why would you write a book review? To tell anyone that reads it, how do you felt about the book!
It’s not that you are not allowed to dislike a book but, if you just give 1 or 2 stars and not say why are you doing it, you are no better than a teacher giving you a grade without showing your errors.
You are not giving the author a constructive feedback, you are not helping the author to evolve and you are definitely not assisting a fellow reader to make their choices regarding their next book.
So ask yourself: Why are you really giving this review?