#106748Editors cannot delete folders – getNearestRecyclerFolder throws InsufficientFolderAccessPermissionsException
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_RECYCLERexists 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.
- 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 returnnullinstead 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.