mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Change credential boolean prefix
This commit is contained in:
		| @@ -221,7 +221,7 @@ | ||||
|             return this.name?"node_label_italic":""; | ||||
|         }, | ||||
|         oneditprepare: function() { | ||||
|             if (this.credentials.user || this.credentials.haspassword) { | ||||
|             if (this.credentials.user || this.credentials.has_password) { | ||||
|                 $('#node-input-useAuth').prop('checked', true); | ||||
|                 $(".node-input-useAuth-row").show(); | ||||
|             } else { | ||||
|   | ||||
| @@ -348,7 +348,7 @@ RED.editor = function() { | ||||
|                 if (credDef[cred].type == 'password') { | ||||
|                     if (credData[cred]) { | ||||
|                         $('#' + prefix + '-' + cred).val(credData[cred]); | ||||
|                     } else if (credData['has' + cred]) { | ||||
|                     } else if (credData['has_' + cred]) { | ||||
|                         $('#' + prefix + '-' + cred).val('__PWRD__'); | ||||
|                     } | ||||
|                     else { | ||||
| @@ -385,7 +385,7 @@ RED.editor = function() { | ||||
|                 var input = $("#" + prefix + '-' + cred); | ||||
|                 var value = input.val(); | ||||
|                 if (credDefinition[cred].type == 'password') { | ||||
|                     node.credentials['has' + cred] = (value != ""); | ||||
|                     node.credentials['has_' + cred] = (value != ""); | ||||
|                     if (value == '__PWRD__') { | ||||
|                         continue; | ||||
|                     } | ||||
|   | ||||
| @@ -49,7 +49,7 @@ function restGET(type) { | ||||
|         for (var cred in definition) { | ||||
|             if (definition.hasOwnProperty(cred)) { | ||||
|                 if (definition[cred].type == "password") { | ||||
|                     var key = 'has' + cred; | ||||
|                     var key = 'has_' + cred; | ||||
|                     sendCredentials[key] = credentials[cred] != null && credentials[cred] !== ''; | ||||
|                     continue; | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user