1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix the problem that the project other than the first project does not encrypt a credential file

This commit is contained in:
Kazuki-Nakanishi 2018-01-29 15:51:16 +09:00
parent 1d4a435f20
commit 0bc7702d95

View File

@ -1015,13 +1015,7 @@ RED.projects = (function() {
}; };
var encryptionState = $("input[name=projects-encryption-type]:checked").val(); var encryptionState = $("input[name=projects-encryption-type]:checked").val();
if (encryptionState === 'enabled') { if (encryptionState === 'enabled') {
var encryptionKeyType = $("input[name=projects-encryption-key]:checked").val();
if (encryptionKeyType === 'custom') {
projectData.credentialSecret = emptyProjectCredentialInput.val(); 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...)
}
} else { } else {
// Disabled encryption by explicitly setting credSec to false // Disabled encryption by explicitly setting credSec to false
projectData.credentialSecret = false; projectData.credentialSecret = false;