Actions
Bug #98440
closedFilemounts from groups are not considered
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Authentication
Target version:
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:
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.
- 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