necouchman commented on a change in pull request #430:
URL: https://github.com/apache/guacamole-client/pull/430#discussion_r414556511
##########
File path: guacamole/src/main/webapp/app/client/types/ManagedClient.js
##########
@@ -577,13 +582,28 @@ angular.module('client').factory('ManagedClient',
['$rootScope', '$injector',
managedClient.filesystems.push(ManagedFilesystem.getInstance(object, name));
});
};
+
+ // Handle any received prompts
+ client.onrequired = function onrequired(parameters) {
+
+ guacPrompt.getUserInput(parameters.reduce((a,b)=> (a[b]='',a),{}))
+ .then(function gotUserInput(data) {
+ for (var parameter in data) {
+ var stream =
client.createArgumentValueStream("text/plain", parameter);
+ var writer = new Guacamole.StringWriter(stream);
+ writer.sendText(data[parameter]);
+ writer.sendEnd();
+ }
+
+ }, function errorUserInput() {
+ $log.error('Error gathering user input.');
+ client.disconnect();
+ });
Review comment:
> Is there a reason the Connection-group is passed around as the
selected object and then later assigned a specific connection? Would there be a
way get the 'assigned' connection first and then pass around that
clientIdentifier?
I think at least one of the reasons is that the user accessing the
connection need not have any knowledge of or even access to the underlying
connection when using a load balancing connection group. That is, you can
assign users access to the top-level connection group and not to anything else,
and they'll still be able to connect. The current behavior insures that this
works, and I think what you're suggesting would require that the user accessing
the connection group also be able to see/read the underlying connection. But,
I'm not sure if there's any good way around this.
@mike-jumper Could use your expertise, here :-).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]