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
|
||||
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>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue