How do I hide bulk operations form for a specified user role? I have a view where I list user's own contents, this contains bulk operations. Users with "add article" permission can see this bulk operations thing but I would like to hide this bulk operations "form element" / "functions" for users in employee role.

How can I do this?
To remove the bulk operations "form element" use ViewExecutable->removeHandler in hook_views_pre_view():

use Drupal\views\ViewExecutable;

/**
 * Implements hook_views_pre_view().
 */
function rgr_main_views_pre_view(ViewExecutable $view, $display_id, array &amp;$args) {

  if ($view-&gt;id() === 'content') {
    $account = \Drupal::currentUser();
    $is_employee = in_array('employee', $account-&gt;getRoles());

    if ($is_employee) {
      $view-&gt;removeHandler($view-&gt;current_display, 'field', 'node_bulk_form');
    }
  }
}


This will hide the dropdown form elements, the checkbox in the row and the submit buttons.