Commit 40bfc7c4 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Exclude pages from linkvalidator path

The linkvalidator module shows the path to the page,
a broken link is on. Since editors might only have access
to a subtree (mount point), the corresponding parent
pages should not be displayed.

This is now fixed by providing the necessary permission
clause to `getRecordPath` in LinkValidatorController.

Resolves: #92539
Releases: main, 11.5
Change-Id: Ibdb54560561dba5d7ad932d89ff5b73fc558f5f2

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Benni Mack's avatarBenni Mack <>
Tested-by: Stefan Bürk's avatarStefan Bürk <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
parent cee749cc
......@@ -472,7 +472,7 @@ class LinkValidatorController
'icon' => $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render(),
'headline' => $row['headline'],
'label' => sprintf($languageService->getLL('list.field'), $fieldLabel),
'path' => BackendUtility::getRecordPath($row['record_pid'], '', 0),
'path' => BackendUtility::getRecordPath($row['record_pid'], $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW), 0),
'linkTitle' => $row['link_title'],
'linkTarget' => $hookObj->getBrokenUrl($row),
'linkStatus' => (bool)($row['url_response']['valid'] ?? false),
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment