mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
Prompt for credentials
fixed prompt for credentials so that ssh and ssh key unlock were both accounted for
This commit is contained in:
@@ -757,9 +757,13 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
|||||||
Rest.setUrl(GetBasePath('credentials')+credential);
|
Rest.setUrl(GetBasePath('credentials')+credential);
|
||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
if((data.kind === "ssh" && data.password === "ASK" ) || data.ssh_key_unlock === "ASK"){
|
if(data.kind === "ssh"){
|
||||||
|
if(data.password === "ASK" ){
|
||||||
passwords.push("ssh_password");
|
passwords.push("ssh_password");
|
||||||
}
|
}
|
||||||
|
if(data.ssh_key_unlock === "ASK"){
|
||||||
|
passwords.push("ssh_key_unlock");
|
||||||
|
}
|
||||||
if(data.sudo_password === "ASK"){
|
if(data.sudo_password === "ASK"){
|
||||||
passwords.push("sudo_password");
|
passwords.push("sudo_password");
|
||||||
}
|
}
|
||||||
@@ -780,6 +784,8 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
|||||||
scope.$emit('PromptForSurvey', html, url);
|
scope.$emit('PromptForSurvey', html, url);
|
||||||
}
|
}
|
||||||
else scope.$emit('StartPlaybookRun', url);
|
else scope.$emit('StartPlaybookRun', url);
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
||||||
|
|||||||
Reference in New Issue
Block a user