Project

General

Profile

Actions

Bug #50574

closed

Setting permissions in TSconfig for files is ignored......

Added by Claus Harup over 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-07-30
Due date:
% Done:

100%

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

Description

Adding the following to my editors be_group has no effect in the filelist module:

permissions.file.default {
addFile = 0
readFile = 0
editFile = 0
writeFile = 0
uploadFile = 0
copyFile = 0
moveFile = 0
renameFile = 0
unzipFile = 0
removeFile = 0
addFolder = 0
readFolder = 0
moveFolder = 0
writeFolder = 0
renameFolder = 0
removeFolder = 0
removeSubfolders = 0
}

From TYPO3\CMS\Core\Authentication\BackendUserAuthentication.php I simply cannot see how the configuration for non-admins could be respected:

public function getFilePermissions() {
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,
'readFolder' => 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
);
if (!$this->isAdmin()) {
$this->filePermissions = $this->getTSConfig('permissions.file.default');
if (!is_array($this->filePermissions)) {
$oldFileOperationPermissions = $this->getFileoperationPermissions();
// Lower permissions if the old file operation permissions are not set
if ($oldFileOperationPermissions ^ 1) {
$defaultOptions['addFile'] = FALSE;
$defaultOptions['uploadFile'] = FALSE;
$defaultOptions['copyFile'] = FALSE;
$defaultOptions['moveFile'] = FALSE;
$defaultOptions['renameFile'] = FALSE;
$defaultOptions['removeFile'] = FALSE;
}
if ($oldFileOperationPermissions ^ 2) {
$defaultOptions['unzipFile'] = FALSE;
}
if ($oldFileOperationPermissions ^ 4) {
$defaultOptions['addFolder'] = FALSE;
$defaultOptions['moveFolder'] = FALSE;
$defaultOptions['renameFolder'] = FALSE;
$defaultOptions['removeFolder'] = FALSE;
}
if ($oldFileOperationPermissions ^ 8) {
$defaultOptions['copyFolder'] = FALSE;
}
if ($oldFileOperationPermissions ^ 16) {
$defaultOptions['removeSubfolders'] = FALSE;
}
}
}
$this->filePermissions = $defaultOptions;
}
return $this->filePermissions;
}

If I devlog $this->filePermissions after $this->filePermissions = $this->getTSConfig('permissions.file.default');

I get the correct permissions but how should they be respected?!?!?!


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #84163: File operation permissions set as bitmask in BackendUserGroup modelClosed2018-03-07

Actions
Actions #1

Updated by Gerrit Code Review about 11 years ago

  • Status changed from New to Under Review

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

Actions #2

Updated by Gerrit Code Review about 11 years ago

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

Actions #3

Updated by Gerrit Code Review about 11 years ago

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

Actions #4

Updated by Gerrit Code Review about 11 years ago

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

Actions #5

Updated by Gerrit Code Review about 11 years ago

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

Actions #6

Updated by Gerrit Code Review about 11 years ago

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

Actions #7

Updated by Gerrit Code Review about 11 years ago

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

Actions #8

Updated by Gerrit Code Review about 11 years ago

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

Actions #9

Updated by Gerrit Code Review about 11 years ago

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

Actions #10

Updated by Gerrit Code Review about 11 years ago

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

Actions #11

Updated by Gerrit Code Review about 11 years ago

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

Actions #12

Updated by Nicole Cordes about 11 years ago

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

Updated by Mathias Brodala over 6 years ago

  • Related to Bug #84163: File operation permissions set as bitmask in BackendUserGroup model added
Actions #14

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF