Commit 0f50cf35 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/+/72941

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 021bc8d9
......@@ -570,7 +570,7 @@ class LinkValidatorReport
</span>
' . (($row['headline'] ?? false) ? htmlspecialchars($row['headline']) : '<i>' . htmlspecialchars($languageService->getLL('list.no.headline')) . '</i>') . '
' . htmlspecialchars(sprintf($languageService->getLL('list.field'), (!empty($fieldName) ? $fieldName : $row['field'])));
$variables['path'] = BackendUtility::getRecordPath($row['record_pid'], '', 0, 0);
$variables['path'] = BackendUtility::getRecordPath($row['record_pid'], $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW), 0);
$variables['link_title'] = $row['link_title'];
$variables['linktarget'] = $hookObj->getBrokenUrl($row);
$response = $row['url_response'];
......
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