markap14 commented on code in PR #6057:
URL: https://github.com/apache/nifi/pull/6057#discussion_r879643327


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessorResource.java:
##########
@@ -423,6 +429,11 @@ public Response getPropertyDescriptor(
         // get the property descriptor
         final PropertyDescriptorDTO descriptor = 
serviceFacade.getProcessorPropertyDescriptor(id, propertyName);
 
+        // Adjust sensitive status for dynamic properties based on requested 
status
+        if (descriptor.isDynamic()) {
+            descriptor.setSensitive(sensitive);
+        }

Review Comment:
   I don't think this is correct. The sensitive flag is, by default, false. 
There may be processors that already have set a particular dynamic property to 
sensitive, and if the UI requests that property but doesn't include a value for 
the 'sensitive' flag, even though the processor itself says it's sensitive, 
this would mark it non-sensitive. I think we need to change this to:
   ```
   if (descriptor.isDynamic() && sensitive) {
       descriptor.setSensitive(true);
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to