Bug #52056
closedRename folder action throws wrong exception on missing right
100%
Description
If a user does not have the rights to rename folders (i.e. permissions.file.defaultrenameFolder = 0
), method \TYPO3\CMS\Core\Resource\ResourceStorage::renameFolder() throws a "InsufficientFileAccessPermissionsException" whereas it should throw "InsufficientUserPermissionsException" instead.
This is consistent with similar user right check and is also the exception expected by \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility::func_rename(), which will then display the error message saying "You are not allowed to rename directories".
The current situation leads to an uncaught exception. The correct solution is to change the exception as explained above, rather than add the currently thrown exception to the list of those being caught.