From 4ea9380a60205b0e8bbfef9046a304310a24c861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lui=CC=81s=20A=2E=20Bastia=CC=83o=20Silva?= Date: Thu, 28 Jan 2016 21:19:37 +0000 Subject: [PATCH] Avoid exception if there is no session --- .../ua/dicoogle/server/web/servlets/webui/WebUIServlet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dicoogle/src/main/java/pt/ua/dicoogle/server/web/servlets/webui/WebUIServlet.java b/dicoogle/src/main/java/pt/ua/dicoogle/server/web/servlets/webui/WebUIServlet.java index 6270c9b8f..7836bbb1e 100644 --- a/dicoogle/src/main/java/pt/ua/dicoogle/server/web/servlets/webui/WebUIServlet.java +++ b/dicoogle/src/main/java/pt/ua/dicoogle/server/web/servlets/webui/WebUIServlet.java @@ -80,7 +80,7 @@ private String getPluginsBySlot(HttpServletRequest req, for (WebUIPlugin plugin : plugins) { - + String pkg = PluginController.getInstance().getWebUIPackageJSON(plugin.getName()); boolean hasUserAllowPlugin= false; for (String r:plugin.getRoles()) @@ -93,7 +93,7 @@ private String getPluginsBySlot(HttpServletRequest req, } - if (pkg != null&&(hasUserAllowPlugin||user.isAdmin())) { + if (pkg != null&&(hasUserAllowPlugin||(user!=null&&user.isAdmin()))) { pkgList.add(pkg); } }