Folders: Correctly show new folder button under root folder (#94687)

show new folder button under root folder if nested folders are disabled and user has the right perms
This commit is contained in:
Ieva 2024-10-15 10:45:07 +01:00 committed by GitHub
parent aaba5a43bd
commit 284c2d6f71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,7 @@ function checkFolderPermission(action: AccessControlAction, folderDTO?: FolderDT
function checkCanCreateFolders(folderDTO?: FolderDTO) {
// Can only create a folder if we have permissions and either we're at root or nestedFolders is enabled
if (folderDTO && !config.featureToggles.nestedFolders) {
if (folderDTO && folderDTO.uid !== 'general' && !config.featureToggles.nestedFolders) {
return false;
}