diff options
author | James Moger <james.moger@gitblit.com> | 2014-09-04 12:37:06 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-09-04 12:37:06 -0400 |
commit | 90c9c9a9af20de464767c7a5726ae7088c6cab3b (patch) | |
tree | b377a55189b4682b15408b4429e6f3971da61687 /src/main/java/com/gitblit/wicket | |
parent | 15f1e91fa3b058fd62cf45e572f743d21d8f1280 (diff) | |
download | gitblit-90c9c9a9af20de464767c7a5726ae7088c6cab3b.tar.gz gitblit-90c9c9a9af20de464767c7a5726ae7088c6cab3b.zip |
Fix NPE when anonymous admins are editing a repository (issue-490)
Diffstat (limited to 'src/main/java/com/gitblit/wicket')
-rw-r--r-- | src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java index f381a45e..200c8dc7 100644 --- a/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java +++ b/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java @@ -56,6 +56,9 @@ public class RepositoryNamePanel extends BasePanel { GitBlitWebSession session = GitBlitWebSession.get();
UserModel user = session.getUser();
+ if (user == null) {
+ user = UserModel.ANONYMOUS;
+ }
// build project set for repository destination
String defaultPath = null;
|