diff --git a/core/modules/user/tests/src/Functional/Views/BulkFormTest.php b/core/modules/user/tests/src/Functional/Views/BulkFormTest.php index a9ba63feed..58863befb9 100644 --- a/core/modules/user/tests/src/Functional/Views/BulkFormTest.php +++ b/core/modules/user/tests/src/Functional/Views/BulkFormTest.php @@ -99,15 +99,6 @@ public function testBulkForm() { $this->drupalGet('test-user-bulk-form'); $this->assertText($this->config('user.settings')->get('anonymous')); - // Attempt to block the anonymous user. - $edit = [ - 'user_bulk_form[0]' => TRUE, - 'action' => 'user_block_user_action', - ]; - $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); - $anonymous_account = $user_storage->load(0); - $this->assertTrue($anonymous_account->isBlocked(), 'Ensure the anonymous user got blocked.'); - // Test the list of available actions with a value that contains a dot. $this->drupalLogin($this->drupalCreateUser(['administer permissions', 'administer views', 'administer users'])); $action_id = 'user_add_role_action.' . $role; diff --git a/core/modules/views/src/Plugin/views/field/BulkForm.php b/core/modules/views/src/Plugin/views/field/BulkForm.php index 737faa252a..b5c841ae94 100644 --- a/core/modules/views/src/Plugin/views/field/BulkForm.php +++ b/core/modules/views/src/Plugin/views/field/BulkForm.php @@ -311,7 +311,7 @@ public function viewsForm(&$form, FormStateInterface $form_state) { $entity = $this->getEntityTranslation($this->getEntity($row), $row); $form[$this->options['id']][$row_index] = [ - '#access' => $entity->access('view'), + '#access' => $entity->access('view label') || $entity->access('view'), '#type' => 'checkbox', // We are not able to determine a main "title" for each row, so we can // only output a generic label.