mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix save and history of credentials for panes
This commit is contained in:
parent
cb0c484579
commit
eab512ef22
@ -131,9 +131,13 @@
|
||||
}
|
||||
}
|
||||
if (node._def.credentials) {
|
||||
var credDefinition = node._def.credentials;
|
||||
var credsChanged = updateNodeCredentials(node,credDefinition,this.inputClass);
|
||||
editState.changed = editState.changed || credsChanged;
|
||||
const credsDefinition = node._def.credentials;
|
||||
const credsChanged = updateNodeCredentials(node, credsDefinition, this.inputClass);
|
||||
|
||||
if (credsChanged) {
|
||||
editState.changed = true;
|
||||
editState.changes.credentials = node.credentials._;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -178,11 +182,14 @@
|
||||
var value = input.val();
|
||||
if (credDefinition[cred].type == 'password') {
|
||||
node.credentials['has_' + cred] = (value !== "");
|
||||
if (value == '__PWRD__') {
|
||||
|
||||
// Skip if the credential has not changed
|
||||
if ((value === '__PWRD__' && node.credentials._['has_' + cred] === true) ||
|
||||
(value === "" && node.credentials._['has_' + cred] === false)) {
|
||||
continue;
|
||||
}
|
||||
changed = true;
|
||||
|
||||
changed = true;
|
||||
}
|
||||
node.credentials[cred] = value;
|
||||
if (value != node.credentials._[cred]) {
|
||||
@ -193,6 +200,4 @@
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user