pulsejet / memories

Fast, modern and advanced photo management suite. Runs as a Nextcloud app.
https://memories.gallery
GNU Affero General Public License v3.0
3.22k stars 87 forks source link

Files Denied by Permissions in Group Folders Show in Memories #1301

Open TeslaBenny opened 2 months ago

TeslaBenny commented 2 months ago

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

pulsejet commented 1 month ago

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.

beckenc commented 1 month ago

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

pulsejet commented 1 month ago

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.

beckenc commented 1 month ago

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

pulsejet commented 1 month ago

Yeah