pulsejet/memories

Files Denied by Permissions in Group Folders Show in Memories

Opened this issue · 5 comments

Describe the bug

When using Group Folders, files that have permissions to block Read access for a user group show up in the Memories app for users in that user group. The file thumbnail is loaded, but the file is not loaded successfully when selected.

When attempting to play a video file that has the Read access permission denied to the user, the video doesn't play and shows an error: "The media could not be loaded, either because the server or network failed or because the format is not supported." Video files in a Group Folder play without issue when the Read permission is granted to the user for the file.

The blocked files do not appear to the user in the Files app (as expected), but the blocked files appear in the Memories app even though they aren't accessible to the user.

Steps To Reproduce

  1. Use the Group Folders app
  2. Configure user group permissions that deny Read access to a user group for select files in the Group Folder
  3. As a user in that restricted user group, include the Group Folder in the Folders Path for Memories
  4. Files that are configured to deny Read access to the user's user group appear in the Memories app

Platform

- OS: Ubuntu 22.04.4 LTS
- Browser: Google Chrome 128.0.6613.138
- Memories Version: 7.4.1
- Nextcloud Version: 29.0.7
- PHP Version: 8.1.18

Screenshots

image

Additional context

  • Any errors in the JS console?
    Lots of:
    Failed to load XImg Error fetching single preview: {"message":"File not found (1828350)"}
    VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported.
    Failed to load resource: the server responded with a status of 404 ()

  • Any errors in the Nextcloud server logs?
    None.

The files are indeed visible in the timeline but they won't be accessible (either the thumbnail or the actual video; likely the reason the thumb is visible is cache)

Seems like this is extremely complicated to fix, since it is the only case where a parent folder is accessible but the child is not. As of now I've no ideas on how this can be implemented. So for now the only workaround is to not use the advanced permissions of group folders in this manner.

Same here at my Installation. I do not see the thumb nor the actual photo. But a weird symbol.
I use the advanced permission on subfolder level.

e.b.

photos (read permission for all)
-- holiday (read permission for X)
-- family (read permission for X and Y)

image

Yes, that's what I meant that the file isn't accessible, but would show up in the timeline. As mentioned, this has no possible fix right now.

Showing the icon for not accessible pictures is possible but hiding is not possible?

Yeah