Issue Bug Closed

#52056Rename folder action throws wrong exception on missing right

Francois Suter 09/17/13, 08:59 updated 10/02/18, 12:10

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.

Reviews 3