]> source.dussan.org Git - gitblit.git/commitdiff
Handle anonymous browsing of branches panel
authorJames Moger <james.moger@gitblit.com>
Sun, 2 Dec 2012 18:14:58 +0000 (13:14 -0500)
committerJames Moger <james.moger@gitblit.com>
Sun, 2 Dec 2012 18:14:58 +0000 (13:14 -0500)
src/com/gitblit/wicket/panels/BranchesPanel.java

index 956e3494edd6343c5f4d8df99573e9406b783d56..1bdf451dee1ff61b1acb7100a3c45fcac60ed39c 100644 (file)
@@ -61,6 +61,9 @@ public class BranchesPanel extends BasePanel {
                // branches\r
                List<RefModel> branches = new ArrayList<RefModel>();\r
                UserModel user = GitBlitWebSession.get().getUser();\r
+               if (user == null) {\r
+                       user = UserModel.ANONYMOUS;\r
+               }\r
 \r
                List<RefModel> localBranches = JGitUtils.getLocalBranches(r, false, maxCount);\r
                for (RefModel refModel : localBranches) {\r