#4373 Do not link on the "Star" button if the user is not authenticated
Merged by pingou. Opened by pingou.
no_link_star_unauth  into  master

Download 4373.patch

Otherwise, people who are not authenticated are able to click on the
button. This will redirect the user to the login page, then back into
the star project endpoint, but this endpoint only accepts POST requests
while redirect can only be done via GET requests.
So the user ends up with a page showing a 405 (method not allowed) error.
By dropping the link for not-authenticated users, we solve this issue.

Fixes https://pagure.io/pagure/issue/4372

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

rebased onto 808ce8b78dc8930ff4e29389a3e4c5feee3ed4cd

:thumbsup:

Thanks :)

Pull-Request has been merged by pingou

Metadata