Tweak the credential handling

- use node.credentials rather than node._creds for consistency with the runtime
 - simplify the structure of node.credentials
This commit is contained in:
Nick O'Leary
2014-07-19 00:16:21 +01:00
parent 760dd022dc
commit b604db83f6
4 changed files with 91 additions and 76 deletions

View File

@@ -92,13 +92,13 @@ var RED = function() {
node.dirty = true;
node.changed = false;
}
if(node._creds) {
delete node._creds;
if(node.credentials) {
delete node.credentials;
}
});
RED.nodes.eachConfig(function (confNode) {
if (confNode._creds) {
delete confNode._creds;
if (confNode.credentials) {
delete confNode.credentials;
}
});
// Once deployed, cannot undo back to a clean state