mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1629: Always include any pre-existing connection group attributes when exposing new ones.
This commit is contained in:
@@ -31,10 +31,13 @@ import org.apache.guacamole.form.Form;
|
|||||||
public interface VaultAttributeService {
|
public interface VaultAttributeService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all connection group attributes to be exposed through the admin UI.
|
* Return all custom connection group attributes to be exposed through the
|
||||||
|
* admin UI for the current vault implementation.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* All connection group attributes to be exposed through the admin UI.
|
* All custom connection group attributes to be exposed through the
|
||||||
|
* admin UI for the current vault implementation.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public Collection<Form> getConnectionGroupAttributes();
|
public Collection<Form> getConnectionGroupAttributes();
|
||||||
}
|
}
|
||||||
|
@@ -28,6 +28,9 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.apache.guacamole.GuacamoleException;
|
import org.apache.guacamole.GuacamoleException;
|
||||||
import org.apache.guacamole.GuacamoleServerException;
|
import org.apache.guacamole.GuacamoleServerException;
|
||||||
import org.apache.guacamole.form.Form;
|
import org.apache.guacamole.form.Form;
|
||||||
@@ -425,7 +428,12 @@ public class VaultUserContext extends TokenInjectingUserContext {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Form> getConnectionGroupAttributes() {
|
public Collection<Form> getConnectionGroupAttributes() {
|
||||||
return attributeService.getConnectionGroupAttributes();
|
|
||||||
|
// Add any custom attributes to any previously defined attributes
|
||||||
|
return Stream.concat(
|
||||||
|
super.getConnectionGroupAttributes().stream(),
|
||||||
|
attributeService.getConnectionGroupAttributes().stream()
|
||||||
|
).collect(Collectors.toUnmodifiableList());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user