Bug #39949
closedLocal file not editable (as admin) - User right 'edit' vs. 'update'
0%
Description
When editing a local file (as admin user without any rights set up), there is a mismatch between the granted defaults and the checked permission. This results in an exception when trying to save a text file.
In t3lib_file_Storage the permission to 'update' is checked
public function setFileContents(t3lib_file_AbstractFile $file, $contents) { // Check if user is allowed to update if (!$this->checkUserActionPermission('update', 'File')) { throw new t3lib_file_exception_InsufficientUserPermissionsException('Updating file "' . $file->getIdentifier() . '" not allowed for user.', 1330121117); }
But the default permissions in t3lib_beUserAuth->getFilePermissions do not include 'update', only 'edit'
if (!isset($this->filePermissions)) { $defaultOptions = array( 'addFile' => TRUE, // new option 'readFile' => TRUE, // new option, generic check of the user rights 'editFile' => TRUE, // new option 'writeFile' => TRUE, // new option, generic check of the user rights 'uploadFile' => TRUE, 'copyFile' => TRUE, 'moveFile' => TRUE, 'renameFile' => TRUE, 'unzipFile' => TRUE, 'removeFile' => TRUE, 'addFolder' => TRUE, 'browseFolder' => TRUE, // new option,, generic check of the user rights 'moveFolder' => TRUE, 'renameFolder' => TRUE, 'writeFolder' => TRUE, // new option, generic check of the user rights 'removeFolder' => TRUE, 'removeSubfolders' => TRUE // was "delete recursively" previously );
Updated by Andreas Wolf about 12 years ago
- Project changed from 1401 to TYPO3 Core
Updated by Andreas Wolf about 12 years ago
- Category set to File Abstraction Layer (FAL)
- TYPO3 Version set to 6.0
Updated by Andreas Wolf about 12 years ago
- Status changed from New to Accepted
Patch for this is pending at #37812.
Updated by Andreas Wolf about 12 years ago
- Status changed from Accepted to Under Review
Updated by Gerrit Code Review about 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14257
Updated by Gerrit Code Review about 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14257
Updated by Gerrit Code Review about 12 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14257
Updated by Anonymous about 12 years ago
- Status changed from Under Review to Resolved
Applied in changeset cfd107268c3173f1fe8e05027bc7d049e9293fff.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed