GUACAMOLE-5: Expose sharing profiles at connection level.

This commit is contained in:
Michael Jumper
2016-07-19 16:52:19 -07:00
parent c304a981e1
commit fc05224512

View File

@@ -32,6 +32,7 @@ import org.apache.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.auth.jdbc.JDBCEnvironment; import org.apache.guacamole.auth.jdbc.JDBCEnvironment;
import org.apache.guacamole.auth.jdbc.base.ModeledGroupedDirectoryObject; import org.apache.guacamole.auth.jdbc.base.ModeledGroupedDirectoryObject;
import org.apache.guacamole.auth.jdbc.sharingprofile.SharingProfileService;
import org.apache.guacamole.form.Field; import org.apache.guacamole.form.Field;
import org.apache.guacamole.form.Form; import org.apache.guacamole.form.Form;
import org.apache.guacamole.form.NumericField; import org.apache.guacamole.form.NumericField;
@@ -99,6 +100,12 @@ public class ModeledConnection extends ModeledGroupedDirectoryObject<ConnectionM
@Inject @Inject
private ConnectionService connectionService; private ConnectionService connectionService;
/**
* Service for managing sharing profiles.
*/
@Inject
private SharingProfileService sharingProfileService;
/** /**
* Service for creating and tracking tunnels. * Service for creating and tracking tunnels.
*/ */
@@ -160,7 +167,7 @@ public class ModeledConnection extends ModeledGroupedDirectoryObject<ConnectionM
@Override @Override
public Set<String> getSharingProfileIdentifiers() public Set<String> getSharingProfileIdentifiers()
throws GuacamoleException { throws GuacamoleException {
return Collections.<String>emptySet(); return sharingProfileService.getIdentifiersWithin(getCurrentUser(), getIdentifier());
} }
@Override @Override