Change the encrypted password dialog to use the user's external username, if one exists.

Fixes #1538
This commit is contained in:
Joseph Schorr 2016-06-14 18:09:42 -04:00
parent f36442aa0d
commit 4b3420eddf
3 changed files with 33 additions and 6 deletions

View file

@ -87,14 +87,19 @@
$scope.generateClientToken = function() {
var generateToken = function(password) {
if (!password) {
return;
}
var data = {
'password': password
};
ApiService.generateUserClientKey(data).then(function(resp) {
$scope.context.encryptedPasswordCredentials = {
'username': $scope.context.viewuser.username,
'password': resp['key']
'username': UserService.getCLIUsername(),
'password': resp['key'],
'namespace': UserService.currentUser().username
};
}, ApiService.errorDisplay('Could not generate token'));
};