Properly check for null when checking system permissions.
This commit is contained in:
1 parent
a53f36b046
commit
eff951fdda
2 files changed
+2
-2
No files matched your search
@@ -168,7 +168,7 @@ public class ConfigurationList extends AuthenticatingHttpServlet {
|
||||
xml.writeStartElement("configs");
|
||||
|
||||
// Save config create permission attribute
|
||||
if (hasConfigPermission(permissions, username,
|
||||
if (permissions != null && hasConfigPermission(permissions, username,
|
||||
SystemPermission.Type.CREATE))
|
||||
xml.writeAttribute("create", "yes");
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ public class UserList extends AuthenticatingHttpServlet {
|
||||
xml.writeStartElement("users");
|
||||
|
||||
// Save user create permission attribute
|
||||
if (hasUserPermission(permissions, username,
|
||||
if (permissions != null && hasUserPermission(permissions, username,
|
||||
SystemPermission.Type.CREATE))
|
||||
xml.writeAttribute("create", "yes");
|
||||
|
||||
|
||||
Reference in new issue
Block a user