#106560File can still be selected via link despite IsFileSelectableEvent restriction
Description
Description:
- Implemented IsFileSelectableEvent.
- Calling $event->denyFileSelection(); correctly removes the + icon and checkboxes.
- Clicking on the file name still selects the file, bypassing the intended restriction.
Steps to Reproduce:
- Implement IsFileSelectableEvent.
- Call $event->denyFileSelection(); on specific files.
- Open the file browser.
- Notice that checkboxes and + icons are removed, but clicking the file name still selects it.
clipboard-202504111551-dstqd.png
Expected Behavior:
Along with the checkbox and ‘+’ icon in the file list in the browser, the select behaviour when we click should not work. Clicking the file name should not select the file if IsFileSelectableEvent denies selection.
Actual Behavior:
Clicking the file name still selects the file.
Affected Versions:
TYPO3 12 and 13.
Reviews 4
- main 89624[BUGFIX] Correct usage of IsFileSelectableEvent
- 13.4 89939[BUGFIX] Correct usage of IsFileSelectableEvent
- 13.4 89069[BUGFIX] Prevent file selection via name link when denied by IsFileSelectableEvent
- main 89064[BUGFIX] Prevent file selection via name link when denied by IsFileSelectableEvent