guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vnick <>
Subject Re: UserName in Guacamole Extension
Date Tue, 03 Oct 2017 14:41:05 GMT
Cayetano wrote
> In an extension for guacamole neesito obtain the name or the ID of the
> current user. The idea is to add a link to other functions and pass the
> user and the connection
> To get the connection ID I use a page like this:
> ---
> <meta name="after-children" content=".home-connection">
> <spam class="vm-manager">
> &lt;a href =
> http://&lt;someserver&gt;/manager?vm={{context.getClientIdentifier(item)}}
> target=\"_blank\"> 
> </spam>
> ---
> Can you do the same to get the user ID?
> I have tried using {{username}}, {{context: getusername ()}} and others,
> but they do not provide the user name or ID value.
> Regards
> Cayetano

I'm not sure how your controller looks for your extension, but you'll
probably need to use the $injector object to get the correct service to grab
the username.  The authenticationService might be what you want - there's a
getCurrentUsername() method that probably does what you want:


Sent from:

View raw message