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 #1

Updated by Francois Suter over 10 years ago

How to test:

  • set up a user without rights to rename a folder
  • switch to that user
  • try to rename a folder and get an uncaught exception
  • apply the patch
  • rename a folder and get a proper error message.
Actions #2

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23862

Actions #3

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23925

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23926

Actions #5

Updated by Francois Suter over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF