mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
Library folders have no ownership tracking, so folder deletion was gated entirely behind library:delete_all - a user with library:delete_own could create folders and delete their own files, but the emptied folder sat there until an admin removed it. Users with library:delete_own can now delete folders that are truly empty: no subfolders and no files, including trashed ones - folder deletion cascades, so removing a folder that holds another user's trashed file would silently break trash restore. External folders (operator-configured mounts) and folders linked to a project or archive still require library:delete_all even when empty, since deleting them affects more than the folder itself. The bulk-delete endpoint applies the same rule instead of skipping all folders for non-admin users. The folder tree's Delete entry enables accordingly and shows a "You can only delete empty folders" hint on non-empty folders. The backend stays authoritative - a folder that only contains trashed files is invisible in the tree but still refuses deletion.