diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-17 22:53:33 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-17 23:08:07 -0400 |
commit | 68fb1791fa8033d464d50e45481d04c3e3d0a025 (patch) | |
tree | fadbdbf75203da14e6fb5181ceed9c4011ee1bbd /src/main/java/com | |
parent | a21f5345df87af6fa54142a1a36404b75217f060 (diff) | |
download | gitblit-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.java | 4 |
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);
|