#3184 Fix browsing projects in a namespace when logged in.
Merged by pingou. Opened by pingou.
fix_browsing  into  master

Download 3184.patch

If all the project in the database have only one admin and no other
members, the user_projects table is empty making the part of the query
filtering for public projects or projects that the user has access to
returning an empty table all the time.
To fix this, Slavek Kabrda and I changed the code from using regular
WHERE statements in the query to using a subquery.

The tests have also been found to be broken as they contained no private
repo and were hitting this bug but without saying so.
They have been adjusted that they are now producing the expected behavior.

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

LGTM :thumbsup:

Thanks :)

Commit 4b298126 fixes this pull-request

Pull-Request has been merged by pingou

Metadata