Problem/Motivation

ModulesListForm doesn't define the accessManager property it uses for route access checks.

Proposed resolution

Define the property.

Remaining tasks

Review patch.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Release notes snippet

n/a

CommentFileSizeAuthor
#2 3143087-2.patch528 bytesneclimdul
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neclimdul created an issue. See original summary.

neclimdul’s picture

Status: Active » Needs review
FileSize
528 bytes

patch

neclimdul’s picture

Title: Define acceManager property for ModulesListForm » Define accessManager property for ModulesListForm
Kristen Pol’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Bug Smash Initiative

Thanks for the issue and patch. Marking RTBC based on the following and because I don't think tests need to be added for this.

1) Patch applies cleanly.

2) Tests pass.

3) Patch addresses the issue noted in the issue summary.

4) Looking at the constructor, all the other parameters have properties defined.

5) The doc block matches others in core.

6) Checked all classes that initialize $this->accessManager to see if any other class had this issue and only saw TestUrl not defining it in the class but it extends Url which does define it so it's covered.

./core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php:    $this->accessManager = $access_manager;
./core/tests/Drupal/Tests/Core/UrlTest.php:    $this->accessManager = $access_manager;
./core/lib/Drupal/Core/Url.php:      $this->accessManager = \Drupal::service('access_manager');
./core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php:    $this->accessManager = $access_manager;
./core/lib/Drupal/Core/Menu/LocalActionManager.php:    $this->accessManager = $access_manager;
./core/lib/Drupal/Core/Menu/ContextualLinkManager.php:    $this->accessManager = $access_manager;
./core/lib/Drupal/Core/Menu/LocalTaskManager.php:    $this->accessManager = $access_manager;
./core/lib/Drupal/Core/Routing/AccessAwareRouter.php:    $this->accessManager = $access_manager;
./core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php:    $this->accessManager = $access_manager;
./core/modules/config_translation/src/Controller/ConfigTranslationController.php:    $this->accessManager = $access_manager;
./core/modules/block_content/src/Plugin/views/area/ListingEmpty.php:    $this->accessManager = $access_manager;
./core/modules/menu_link_content/src/MenuLinkContentAccessControlHandler.php:    $this->accessManager = $access_manager;
./core/modules/system/src/Form/ModulesListForm.php:    $this->accessManager = $access_manager;
./core/modules/system/src/PathBasedBreadcrumbBuilder.php:    $this->accessManager = $access_manager;
./core/modules/node/src/Plugin/views/area/ListingEmpty.php:    $this->accessManager = $access_manager;
./core/modules/views/src/Plugin/views/field/LinkBase.php:    $this->accessManager = $access_manager;
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Whilst this is a slight change of visibility for the property form classes are not API so this is acceptable for a minor release.

Committed 0c30b0d and pushed to 9.1.x. Thanks!

  • alexpott committed 0c30b0d on 9.1.x
    Issue #3143087 by neclimdul, Kristen Pol: Define accessManager property...

Status: Fixed » Closed (fixed)

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