mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Ticket #399: Allow modifying SimpleConnectionDirectory.
This commit is contained in:
@@ -95,18 +95,30 @@ public class SimpleConnectionDirectory
|
|||||||
@Override
|
@Override
|
||||||
public void add(Connection connection)
|
public void add(Connection connection)
|
||||||
throws GuacamoleException {
|
throws GuacamoleException {
|
||||||
throw new GuacamoleSecurityException("Permission denied.");
|
|
||||||
|
if(connections.containsKey(connection.getIdentifier()))
|
||||||
|
throw new GuacamoleException("Connection identifier already present.");
|
||||||
|
|
||||||
|
connections.put(connection.getIdentifier(), connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(Connection connection)
|
public void update(Connection connection)
|
||||||
throws GuacamoleException {
|
throws GuacamoleException {
|
||||||
throw new GuacamoleSecurityException("Permission denied.");
|
|
||||||
|
if(!connections.containsKey(connection.getIdentifier()))
|
||||||
|
throw new GuacamoleException("Connection not found.");
|
||||||
|
|
||||||
|
connections.put(connection.getIdentifier(), connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(String identifier) throws GuacamoleException {
|
public void remove(String identifier) throws GuacamoleException {
|
||||||
throw new GuacamoleSecurityException("Permission denied.");
|
|
||||||
|
if(!connections.containsKey(identifier))
|
||||||
|
throw new GuacamoleException("Connection not found.");
|
||||||
|
|
||||||
|
connections.remove(identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user