wikitongues / poly

Open source, modern software to share and learn every language in the world.
https://poly.wikitongues.org
GNU General Public License v3.0
80 stars 19 forks source link

Route /users/# shows empty books on latest books list #293

Open FredericoAndrade opened 6 years ago

FredericoAndrade commented 6 years ago

When looking at a user's page, only books with phrases should be shown, using "most_recent_with_content" method or similar from Book model.

image

Logged in user should only be able to see books by other authors if they have phrases. This is the case both in the global list and in the local user list.

AmrAdelKhalil commented 6 years ago

Hi @FredericoAndrade "most_recent_with_content" already prevents books with no phrases to be shown up in the "latest books" list even if it was the owner of the book, I tried to create a new book with no phrases and it does not appear in the list , So i'm going to add a pull request that prevents to the logged in user to see his own books in the "latest books", Could you tell me how did you get this case in the image attached to the issue, please? https://github.com/wikitongues/poly/pull/294