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