Merge pull request #1587 from node-red-hitachi/master-pj-cred

Fix the problem that does not encrypt credential file
This commit is contained in:
Nick O'Leary 2018-01-29 11:13:19 +00:00 committed by GitHub
commit a25f6fec9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -1015,13 +1015,7 @@ RED.projects = (function() {
};
var encryptionState = $("input[name=projects-encryption-type]:checked").val();
if (encryptionState === 'enabled') {
var encryptionKeyType = $("input[name=projects-encryption-key]:checked").val();
if (encryptionKeyType === 'custom') {
projectData.credentialSecret = emptyProjectCredentialInput.val();
} else {
// If 'use default', leave projectData.credentialSecret blank - as that will trigger
// it to use the default (TODO: if its set...)
}
projectData.credentialSecret = emptyProjectCredentialInput.val();
} else {
// Disabled encryption by explicitly setting credSec to false
projectData.credentialSecret = false;