You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by bb...@apache.org on 2016/11/03 13:47:43 UTC

nifi git commit: NIFI-2931: - Using the delete button state (which correctly checks if a policy is inherited) to drive the presence of the remove user button.

Repository: nifi
Updated Branches:
  refs/heads/master 9e4473404 -> edb0ebe52


NIFI-2931: - Using the delete button state (which correctly checks if a policy is inherited) to drive the presence of the remove user button.

This closes #1153.

Signed-off-by: Bryan Bende <bb...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/edb0ebe5
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/edb0ebe5
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/edb0ebe5

Branch: refs/heads/master
Commit: edb0ebe52b8ade4842cad6b5e3aa489288e18d75
Parents: 9e44734
Author: Matt Gilman <ma...@gmail.com>
Authored: Fri Oct 21 14:24:46 2016 -0400
Committer: Bryan Bende <bb...@apache.org>
Committed: Thu Nov 3 09:47:26 2016 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/canvas/nf-policy-management.js        | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/edb0ebe5/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
index d738b58..01b1ed1 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
@@ -516,9 +516,8 @@ nf.PolicyManagement = (function () {
 
             // see if the user has permissions for the current policy
             var currentEntity = $('#policy-table').data('policy');
-            var resourceComponentId = nf.Common.substringAfterLast(currentEntity.component.resource, '/');
-            var selectedComponentId = $('#selected-policy-component-id').text();
-            if (currentEntity.permissions.canWrite === true && resourceComponentId === selectedComponentId) {
+            var isPolicyEditable = $('#delete-policy-button').is(':disabled') === false;
+            if (currentEntity.permissions.canWrite === true && isPolicyEditable) {
                 markup += '<div title="Remove" class="pointer delete-user fa fa-trash"></div>';
             }