Issue Bug Closed

#106748Editors cannot delete folders – getNearestRecyclerFolder throws InsufficientFolderAccessPermissionsException

Michael Neumann 05/22/25, 08:53 updated 12/02/25, 13:59

Description

Editors (non-admin users) are unable to delete folders via the Filelist module if the parent folder is not accessible due to permission restrictions.

The method \TYPO3\CMS\Core\Resource\ResourceStorage::getNearestRecyclerFolder() throws an InsufficientFolderAccessPermissionsException when:
  • No folder with the role FolderInterface::ROLE_RECYCLER exists in the accessible hierarchy or
  • The parent folder (e.g., fileadmin/) is not accessible due to user permissions.
fileadmin         [no access]
└── folder1       [file mount]
    ├── _recycler_
    └── folder-to-delete

In this scenario, folder-to-delete cannot be deleted because the method fails to resolve a valid recycler folder due to restricted access to fileadmin.

Expected Behavior:
  • Deletion should work as long as a _recycler_ folder exists within the accessible tree, and the user has permissions to use it.
  • Alternatively: If no _recycler_ folder exists or is accessible, the method should return null instead of throwing an exception.

*Actual Behavior:*
The method getNearestRecyclerFolder() throws an InsufficientFolderAccessPermissionsException, preventing the folder from being deleted.

*Possible Fix:*
Catch and suppress InsufficientFolderAccessPermissionsException during traversal.

Reviews 2