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

Improve access logic for Navigation blocks page

$
0
0

Problem/Motivation

Navigation Blocks page (/admin/config/user-interface/navigation-block) is the place to go to edit the navigation layout and manage the blocks to be included there.

Current NavigationSectionStorage::access() implementation just gives free access to the page. That added to logic in LayoutBuilderAccessCheck::access() ends up being just like checking for configure any layout permission.

That permission is not very restrictive nor representative for Navigation module.

Would be great to have a more representative and intituive way to manage access to that page.

Proposed resolution

Create a new Administer Navigation Layout permission
Override NavigationSectionStorage::access() to check for that permission
Add handles_permission_check to NavigationSectionStorage class attributes to not grant access based on configure any layout permission.

Remaining tasks

Implement changes.
Add tests.

User interface changes

None

API changes

New permission added.

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 297360

Trending Articles