Actions
Bug #77856
closedBackendUserAuthentication::getDefaultUploadFolder checks the wrong permission flag
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-09-05
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:
Description
In BackendUserAuthentication::getDefaultUploadFolder, the addFolder permission flag is checked instead of the writeFolder permission flag in determining whether the folder is writable and thus suitable as an upload target.
I found this issue while checking #77841, which would lead to users not getting the IRRE "Upload file" button if they didn't have the "addFolder" permission.
The steps from the other ticket can be used to reproduce this too:- Create a BE user with any mix of file operation permissions, as long as the "Folder/Directory Add" permission is not given, and "Write Folder" + "Add File" are given.
- As the BE user, create a CE of the type "Text and Media".
- Switch to the "Media" tab in the CE form
- The button is not visible. Via the "Add media" button, files can still be uploaded.
In this case (with #77841 fixed) the button is not visible, due to (as can be seen when stepping through with e.g. XDebug) no folder suitable for uploading files can be found.
Actions