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
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72905

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
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),
......
Markdown is supported
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