Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 314089

Views bulk forms perform redirects to the confirmation page even if it is not allowed for the user

$
0
0

Problem/Motivation

If a user does not have access to perform a bulk operation on any of the selected entities and the selected action requires a redirect to a confirmation form, the redirect is still performed, even though it does not make sense anyway and also results in an Access denied page being shown to the user.

Drupal's access denied page with an error message about not being allowed to peform the Delete content action.

Proposed resolution

Do not perform the redirect if the user does not have access to perform the bulk operation on any of the entities. We already show a proper error message for the non-allowed entities anyway, so it should be clear what is happening.

The if ($count) check in \Drupal\views\Plugin\views\field\BulkForm::viewsFormSubmit() can simply be moved before the check for the confirm route to solve this issue.


Viewing all articles
Browse latest Browse all 314089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>