fix(help-center): resolve API docs visibility via layout provider

The api_docs.view ability was missing from layoutAuth after removing
the sidebar.admin_nav_item slot from the api-docs module. Add a
HelpCenterLayoutProvider that checks the ability via AuthorizationService
and provides the result in layout nav context (help-center.nav). Panel
template now reads can_view_api_docs from the provider instead of
layoutAuth.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 14:41:17 +01:00
parent 0bb8702019
commit 376cf67c31
3 changed files with 35 additions and 2 deletions

View File

@@ -39,7 +39,9 @@ return [
'search_resources' => [],
'asset_groups' => [],
'scheduler_jobs' => [],
'layout_context_providers' => [],
'layout_context_providers' => [
\MintyPHP\Module\HelpCenter\Providers\HelpCenterLayoutProvider::class,
],
'session_providers' => [],
'permissions' => [],
'event_listeners' => [],