Function respectFileMounts in Classes/Security/FilePermissionsAspect.php incorrect
abvdveen opened this issue · 1 comments
abvdveen commented
Hi,
Just spent 6 hours debugging the fact that BE users other than admin would not see any files when listing a folder in the Media module. It turns out this line screws up the permissions check:
$fileMountUids = implode(',', array_filter($fileMounts));
This triggers choosing the wrong expression in function addDemandConstraints in vidi/Classes/Service/DataService.php:
uid
= '54,4,49,43,55,36,37,39,41,56,51'
which should be:
uid
IN (54, 4, 49, 43, 55, 36, 37, 39, 41, 56, 51)
Changing the implode to:
$fileMountUids = array_filter($fileMounts);
fixes it.
hannesbochmann commented
@abvdveen Thanks for the effort. You saved me those hours of debugging.