Skip to content

Commit

Permalink
Avoid exception if there is no session
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiao committed Jan 28, 2016
1 parent 7fa51b8 commit 4ea9380
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 4ea9380

Please sign in to comment.