Skip to content

Commit

Permalink
Change the repository index anonymuos user behaviour based on the exi…
Browse files Browse the repository at this point in the history
…stance of an Anonymous enabled repository

When there are no Anonymous Repositories goto jail, I mean the logon screen for Anonymous users.  Otherwise goto the repsitory index.
  • Loading branch information
jeffgaroutte committed Jul 6, 2017
1 parent 377350c commit bf557e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Bonobo.Git.Server/Controllers/RepositoryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public class RepositoryController : Controller
public ActionResult Index(string sortGroup = null, string searchString = null)
{
var firstList = this.GetIndexModel();
if (!User.Identity.IsAuthenticated && !firstList.Any())
{
return RedirectToAction("Logon", "Home");
}
if (!string.IsNullOrEmpty(searchString))
{
var search = searchString.ToLower();
Expand Down

0 comments on commit bf557e8

Please sign in to comment.