summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 22:53:33 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-17 23:08:07 -0400
commit68fb1791fa8033d464d50e45481d04c3e3d0a025 (patch)
treefadbdbf75203da14e6fb5181ceed9c4011ee1bbd /src/main/java/com
parenta21f5345df87af6fa54142a1a36404b75217f060 (diff)
downloadgitblit-68fb1791fa8033d464d50e45481d04c3e3d0a025.tar.gz
gitblit-68fb1791fa8033d464d50e45481d04c3e3d0a025.zip
[findbugs] Add null check when testing if a user is disabled in SessionPage
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SessionPage.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/SessionPage.java b/src/main/java/com/gitblit/wicket/pages/SessionPage.java
index 909342ae..7a58175f 100644
--- a/src/main/java/com/gitblit/wicket/pages/SessionPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/SessionPage.java
@@ -56,8 +56,8 @@ public abstract class SessionPage extends WebPage {
// any changes to permissions or roles (issue-186)
UserModel user = app().users().getUserModel(session.getUser().username);
- if (user.disabled) {
- // user was disabled during session
+ if (user == null || user.disabled) {
+ // user was deleted/disabled during session
HttpServletResponse response = ((WebResponse) getRequestCycle().getResponse())
.getHttpServletResponse();
app().authentication().logout(response, user);