Actions
Bug #82917
openLink to file that are not visible should not be displayed (solution included)
Status:
New
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2017-11-03
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
A link to a invisble file (sys_file_metadata) should not be displayed using FileOrFolderLinkBuilder or ContentObjectRenderer.php
Adding the following code to FileOrFolderLinkBuilder->build solve the problem.
if ($fileOrFolderObject->getProperties()['visible'] === 0) {
throw new \TYPO3\CMS\Frontend\Typolink\UnableToLinkException(
'File "' . $linkDetails['typoLinkParameter'] . '" is not visible so "' . $linkText . '" was not linked.', 1490989449, null, $linkText
);
}
Actions