mirror of
https://github.com/node-red/node-red
synced 2024-11-23 00:52:33 +00:00
Change credential boolean prefix
This commit is contained in:
parent
d67a54a66a
commit
4302deb5a6
@ -221,7 +221,7 @@
|
|||||||
return this.name?"node_label_italic":"";
|
return this.name?"node_label_italic":"";
|
||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
if (this.credentials.user || this.credentials.haspassword) {
|
if (this.credentials.user || this.credentials.has_password) {
|
||||||
$('#node-input-useAuth').prop('checked', true);
|
$('#node-input-useAuth').prop('checked', true);
|
||||||
$(".node-input-useAuth-row").show();
|
$(".node-input-useAuth-row").show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -348,7 +348,7 @@ RED.editor = function() {
|
|||||||
if (credDef[cred].type == 'password') {
|
if (credDef[cred].type == 'password') {
|
||||||
if (credData[cred]) {
|
if (credData[cred]) {
|
||||||
$('#' + prefix + '-' + cred).val(credData[cred]);
|
$('#' + prefix + '-' + cred).val(credData[cred]);
|
||||||
} else if (credData['has' + cred]) {
|
} else if (credData['has_' + cred]) {
|
||||||
$('#' + prefix + '-' + cred).val('__PWRD__');
|
$('#' + prefix + '-' + cred).val('__PWRD__');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -385,7 +385,7 @@ RED.editor = function() {
|
|||||||
var input = $("#" + prefix + '-' + cred);
|
var input = $("#" + prefix + '-' + cred);
|
||||||
var value = input.val();
|
var value = input.val();
|
||||||
if (credDefinition[cred].type == 'password') {
|
if (credDefinition[cred].type == 'password') {
|
||||||
node.credentials['has' + cred] = (value != "");
|
node.credentials['has_' + cred] = (value != "");
|
||||||
if (value == '__PWRD__') {
|
if (value == '__PWRD__') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ function restGET(type) {
|
|||||||
for (var cred in definition) {
|
for (var cred in definition) {
|
||||||
if (definition.hasOwnProperty(cred)) {
|
if (definition.hasOwnProperty(cred)) {
|
||||||
if (definition[cred].type == "password") {
|
if (definition[cred].type == "password") {
|
||||||
var key = 'has' + cred;
|
var key = 'has_' + cred;
|
||||||
sendCredentials[key] = credentials[cred] != null && credentials[cred] !== '';
|
sendCredentials[key] = credentials[cred] != null && credentials[cred] !== '';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user