Skip to content

Function respectFileMounts in Classes/Security/FilePermissionsAspect.php incorrect #213

@abvdveen

Description

@abvdveen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions