Project

General

Profile

Actions

Bug #98440

closed

Filemounts from groups are not considered

Added by Christopher Schnell about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Authentication
Start date:
2022-09-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

When a backend user has a custom database mount pointing to somewhere in the page tree, the setting "Mount from groups"->"File Mounts" is not considered. This leads to an error, when the user tries to use the filelist. The complete setup to repoduce:
  • Backend User (non-admin)
  • User has custom DB Mounts (or only group mounts that do not point to the root page)
  • The setting "Mount from groups"->"File Mounts" is activated
  • The User has no custom file mounts
  • The "root" filemount is attached to one of the groups, the user is a member of.

When logging in, this user should be able to use the File List module.
Instead an error is shown and the File List remains empty

Missing folder permissions.
You have no access to the folder "1:/user_upload/".

The problem is that the BackendUserAuthentication never checks the filemounts.
core/Classes/Authentication/BackendUserAuthentication.php (lines 1164 to 1171)

// Mount group database-mounts
if ($mountOptions->shouldUserIncludePageMountsFromAssociatedGroups()) {
    $this->groupData['webmounts'] .= ',' . $groupInfo['db_mountpoints'];
}
// Mount group file-mounts
if ($mountOptions->shouldUserIncludePageMountsFromAssociatedGroups()) {
    $this->groupData['filemounts'] .= ',' . $groupInfo['file_mountpoints'];
}

The second if again calls $mountOptions->shouldUserIncludePageMountsFromAssociatedGroups() instead of $mountOptions->shouldUserIncludeFileMountsFromAssociatedGroups() which already exists in the BackendGroupMountOption Class. Changing shouldUserIncludePageMountsFromAssociatedGroups to shouldUserIncludeFileMountsFromAssociatedGroups solves the problem.

Actions #1

Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75873

Actions #2

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75873

Actions #3

Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75892

Actions #4

Updated by Christopher Schnell about 2 years ago

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

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF