Properly check for null when checking system permissions.

This commit is contained in:
Michael Jumper
2013-01-30 15:01:54 -08:00
parent a53f36b046
commit eff951fdda
2 changed files with 2 additions and 2 deletions

View File

@@ -168,7 +168,7 @@ public class ConfigurationList extends AuthenticatingHttpServlet {
xml.writeStartElement("configs"); xml.writeStartElement("configs");
// Save config create permission attribute // Save config create permission attribute
if (hasConfigPermission(permissions, username, if (permissions != null && hasConfigPermission(permissions, username,
SystemPermission.Type.CREATE)) SystemPermission.Type.CREATE))
xml.writeAttribute("create", "yes"); xml.writeAttribute("create", "yes");

View File

@@ -152,7 +152,7 @@ public class UserList extends AuthenticatingHttpServlet {
xml.writeStartElement("users"); xml.writeStartElement("users");
// Save user create permission attribute // Save user create permission attribute
if (hasUserPermission(permissions, username, if (permissions != null && hasUserPermission(permissions, username,
SystemPermission.Type.CREATE)) SystemPermission.Type.CREATE))
xml.writeAttribute("create", "yes"); xml.writeAttribute("create", "yes");