mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-10-28 07:33:08 +00:00
Properly check for null when checking system permissions.
This commit is contained in:
@@ -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");
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user