Problem/Motivation

As of version ^4.1 of VBO, the changes introduced in the issue: https://www.drupal.org/project/views_bulk_operations/issues/3246212 generate conflicts.

These occur because, depending on the interface "/Drupal/Core/Action/Action/ActionInterface.php" in the access function, the return can be an object or a boolean, depending on the argument $return_as_object which by default is set to FALSE.

In case $return_as_object = TRUE, the "VboEnqueue.php" access function should return the object and currently this is not contemplated.

Proposed resolution

Return AccessResult::forbidden when $valid is FALSE, and AccessResult::allowed() when $valid is TRUE, in the case $return_as_object is TRUE. All this it must be done in the access method.

Issue fork 3123586-3272423

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

albeorte created an issue. See original summary.

albeorte’s picture

Issue summary: View changes
omarlopesino’s picture

Issue summary: View changes
Issue tags: +Novice

Updated the proposed resolution with detailed guidelines. I propose you to do those changes, check that everything works fine after updating the module.

elber’s picture

Assigned: Unassigned » elber

albeorte’s picture

Status: Active » Needs review

Updates done.
Working properly, please review the changes.

omarlopesino’s picture

Assigned: elber » Unassigned

  • albeorte committed 39413e8 on 8.x-1.x
    Issue #3272423: access return object or bool depending on...
  • albeorte committed 9ab5ce3 on 8.x-1.x
    Issue #3272423: Import class AccessResult;
    
omarlopesino’s picture

The MR looks good to me. Marking the issue as fixed as I've just merged the MR. Thanks!

albeorte’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.