Project

General

Profile

Actions

Bug #52056

closed

Rename folder action throws wrong exception on missing right

Added by Francois Suter over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-09-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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.

Actions

Also available in: Atom PDF