diff options
author | James Moger <james.moger@gitblit.com> | 2012-12-02 13:14:58 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-12-02 13:14:58 -0500 |
commit | 635006f7b005fad8fc9d7844a103b344eeee51f2 (patch) | |
tree | f07d278382085c0e916e9c5b0e21b4b743910ee4 | |
parent | 9da9764c5073118fc3b46bb360e1071426a9b9f4 (diff) | |
download | gitblit-635006f7b005fad8fc9d7844a103b344eeee51f2.tar.gz gitblit-635006f7b005fad8fc9d7844a103b344eeee51f2.zip |
Handle anonymous browsing of branches panel
-rw-r--r-- | src/com/gitblit/wicket/panels/BranchesPanel.java | 3 |
1 files changed, 3 insertions, 0 deletions
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<RefModel> branches = new ArrayList<RefModel>();
UserModel user = GitBlitWebSession.get().getUser();
+ if (user == null) {
+ user = UserModel.ANONYMOUS;
+ }
List<RefModel> localBranches = JGitUtils.getLocalBranches(r, false, maxCount);
for (RefModel refModel : localBranches) {
|