Project

General

Profile

Actions

Bug #39949

closed

Local file not editable (as admin) - User right 'edit' vs. 'update'

Added by Andreas Kießling over 12 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2012-08-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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
            );


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #37812: Admin has no rights to update a fileClosedAndreas Wolf2012-06-07

Actions
Actions

Also available in: Atom PDF