From 635006f7b005fad8fc9d7844a103b344eeee51f2 Mon Sep 17 00:00:00 2001 From: James Moger Date: Sun, 2 Dec 2012 13:14:58 -0500 Subject: [PATCH] Handle anonymous browsing of branches panel --- src/com/gitblit/wicket/panels/BranchesPanel.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/gitblit/wicket/panels/BranchesPanel.java b/src/com/gitblit/wicket/panels/BranchesPanel.java index 956e3494..1bdf451d 100644 --- a/src/com/gitblit/wicket/panels/BranchesPanel.java +++ b/src/com/gitblit/wicket/panels/BranchesPanel.java @@ -61,6 +61,9 @@ public class BranchesPanel extends BasePanel { // branches List branches = new ArrayList(); UserModel user = GitBlitWebSession.get().getUser(); + if (user == null) { + user = UserModel.ANONYMOUS; + } List localBranches = JGitUtils.getLocalBranches(r, false, maxCount); for (RefModel refModel : localBranches) { -- 2.39.5