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 <bbende@apache.org>
This commit is contained in:
Matt Gilman 2016-10-21 14:24:46 -04:00 committed by Bryan Bende
parent 9e44734042
commit edb0ebe52b
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 2 additions and 3 deletions

View File

@ -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>';
}