mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
System permission names should be compared with equals(), not startsWith().
This commit is contained in:
@@ -85,15 +85,15 @@ public class Update extends AuthenticatingHttpServlet {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Create user
|
||||
if (str.startsWith(CREATE_USER_PERMISSION))
|
||||
if (str.equals(CREATE_USER_PERMISSION))
|
||||
return new SystemPermission(SystemPermission.Type.CREATE_USER);
|
||||
|
||||
// Create connection
|
||||
if (str.startsWith(CREATE_CONNECTION_PERMISSION))
|
||||
if (str.equals(CREATE_CONNECTION_PERMISSION))
|
||||
return new SystemPermission(SystemPermission.Type.CREATE_CONNECTION);
|
||||
|
||||
// Administration
|
||||
if (str.startsWith(ADMIN_PERMISSION))
|
||||
if (str.equals(ADMIN_PERMISSION))
|
||||
return new SystemPermission(SystemPermission.Type.ADMINISTER);
|
||||
|
||||
throw new GuacamoleException("Invalid permission string.");
|
||||
|
Reference in New Issue
Block a user