#446 Only hides sections if the user is logged in
Merged by pingou. Opened by pingou.
repos_loggedout  into  master

Download 446.patch
no initial comment

I don't understand. What's this all about?

So for using pagure as a frontend for pkgs.fp.o we added the option to hide by default some of the sections in the home page of logged in user.
The idea is that logged in on the pagure instance of pkgs.fp.o you won't see the list of all the repos, unless to toggle the button to.

The problem was that I was hiding the section all the time, resulting in an empty front page if you went to see pkgs.fp.o logged out because I was hiding the list of all the repo.

With this change, if you're logged out, your front page shows all the repos in the instance, if you're logged in, you see your repos and your forks and the list of all the projects is hidden by default.

FWIW, perhaps it would be faster to hide the repos by filtering from the db query? Here it actually includes them all in the response, but just hides them. If showing "all" packages, that could be sub-optimal? Just a non-blocking thought.

But then how do you propose we make the toggle button work? With an API call?

That could work I guess, we could make filling the three sections, three API calls

Ok let's merge this and make the API calls question a ticket :)

Metadata