mirror of https://github.com/apache/nifi.git
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:
parent
9e44734042
commit
edb0ebe52b
|
@ -516,9 +516,8 @@ nf.PolicyManagement = (function () {
|
||||||
|
|
||||||
// see if the user has permissions for the current policy
|
// see if the user has permissions for the current policy
|
||||||
var currentEntity = $('#policy-table').data('policy');
|
var currentEntity = $('#policy-table').data('policy');
|
||||||
var resourceComponentId = nf.Common.substringAfterLast(currentEntity.component.resource, '/');
|
var isPolicyEditable = $('#delete-policy-button').is(':disabled') === false;
|
||||||
var selectedComponentId = $('#selected-policy-component-id').text();
|
if (currentEntity.permissions.canWrite === true && isPolicyEditable) {
|
||||||
if (currentEntity.permissions.canWrite === true && resourceComponentId === selectedComponentId) {
|
|
||||||
markup += '<div title="Remove" class="pointer delete-user fa fa-trash"></div>';
|
markup += '<div title="Remove" class="pointer delete-user fa fa-trash"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue