From 85405dae15ee76128818634c7bd45201a8b1a2d2 Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Fri, 5 May 2017 11:07:46 -0400 Subject: [PATCH] [NIFI-3813] fix broken PG config dialog when user has read only perms on the PG. This closes #1757 --- .../webapp/js/nf/canvas/nf-process-group-configuration.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js index 00810c7fc0..498fbd754c 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js @@ -177,8 +177,9 @@ // store the process group $('#process-group-configuration').data('process-group', response); + var processGroup = response.component; + if (response.permissions.canWrite) { - var processGroup = response.component; // populate the process group settings $('#process-group-name').removeClass('unset').val(processGroup.name); @@ -196,8 +197,8 @@ } else { if (response.permissions.canRead) { // populate the process group settings - $('#read-only-process-group-name').removeClass('unset').text(response.component.name); - $('#read-only-process-group-comments').removeClass('unset').text(response.component.comments); + $('#read-only-process-group-name').removeClass('unset').text(processGroup.name); + $('#read-only-process-group-comments').removeClass('unset').text(processGroup.comments); // populate the header $('#process-group-configuration-header-text').text(processGroup.name + ' Configuration');