GUAC-1101: Migrate to recent API changes on batch-directory branch.

This commit is contained in:
Michael Jumper
2015-02-23 13:23:33 -08:00
parent 9c161c9fc6
commit f78281e3c8
2 changed files with 18 additions and 9 deletions

View File

@@ -26,6 +26,7 @@ package net.sourceforge.guacamole.net.auth.mysql;
import com.google.inject.Inject;
import java.util.Collections;
import org.glyptodon.guacamole.GuacamoleException;
import org.glyptodon.guacamole.net.auth.Connection;
import org.glyptodon.guacamole.net.auth.ConnectionGroup;
import org.glyptodon.guacamole.net.auth.Directory;
import org.glyptodon.guacamole.net.auth.User;
@@ -73,12 +74,26 @@ public class MySQLUserContext implements UserContext {
return userDirectory;
}
@Override
public Directory<Connection> getConnectionDirectory() throws GuacamoleException {
/* STUB */
return new SimpleConnectionDirectory(Collections.EMPTY_LIST);
}
@Override
public Directory<ConnectionGroup> getConnectionGroupDirectory() throws GuacamoleException {
/* STUB */
return new SimpleConnectionGroupDirectory(Collections.EMPTY_LIST);
}
@Override
public ConnectionGroup getRootConnectionGroup() throws GuacamoleException {
/* STUB */
return new SimpleConnectionGroup("ROOT", "ROOT",
new SimpleConnectionDirectory(Collections.EMPTY_MAP),
new SimpleConnectionGroupDirectory(Collections.EMPTY_LIST)
return new SimpleConnectionGroup(
MySQLConstants.CONNECTION_GROUP_ROOT_IDENTIFIER,
MySQLConstants.CONNECTION_GROUP_ROOT_IDENTIFIER,
Collections.EMPTY_LIST,
Collections.EMPTY_LIST
);
}

View File

@@ -65,12 +65,6 @@ public class UserDirectory implements Directory<User> {
this.currentUser = currentUser;
}
@Override
public void move(String identifier, Directory<User> groupIdentifier)
throws GuacamoleException {
throw new GuacamoleSecurityException("Permission denied.");
}
@Override
public User get(String identifier) throws GuacamoleException {
return userService.retrieveObject(currentUser, identifier);