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"> > <a href = > http://<someserver>/manager?vm={{context.getClientIdentifier(item)}} > target=\"_blank\"> <images/gear.png> > > </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: https://github.com/apache/incubator-guacamole-client/blob/d808f7fbbdef9a0e14b139ac31e9fa225354efc6/guacamole/src/main/webapp/app/auth/service/authenticationService.js#L347 -Nick -- Sent from: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/
