[BUGFIX] Revert FolderCheck for clipboard actions 21/62321/2
authorGuido Schmechel <guido.schmechel@brandung.de>
Wed, 13 Nov 2019 20:25:44 +0000 (21:25 +0100)
committerBenni Mack <benni@typo3.org>
Mon, 16 Dec 2019 20:10:44 +0000 (21:10 +0100)
Due to a faulty query in #85425 it was no longer possible
to copy files at the clipboard multi-selection-mode.

This must be possible if the user has the permission to copy files,
but not to copy folders.

Resolves: #89669
Releases: master, 9.5
Change-Id: I1c26696a6c3886dd5669957cdce8ca472b17b577
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62321
Tested-by: Peter Kraume <peter.kraume@gmx.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Henrik Elsner <helsner@dfau.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Peter Kraume <peter.kraume@gmx.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Henrik Elsner <helsner@dfau.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/filelist/Classes/FileList.php

index 8d5f80c..91b9865 100644 (file)
@@ -500,12 +500,8 @@ class FileList
                         }
                     }
                     if ($this->clipObj->current !== 'normal' && $iOut) {
-                        if ($this->folderObject->checkActionPermission('copy') && $this->folderObject->checkActionPermission('write') && $this->folderObject->checkActionPermission('move')) {
-                            $cells[] = $this->linkClipboardHeaderIcon('<span title="' . htmlspecialchars($this->getLanguageService()->getLL('clip_selectMarked')) . '">' . $this->iconFactory->getIcon('actions-edit-copy', Icon::SIZE_SMALL)->render() . '</span>', $table, 'setCB');
-                        }
-                        if ($this->folderObject->checkActionPermission('delete')) {
-                            $cells[] = $this->linkClipboardHeaderIcon('<span title="' . htmlspecialchars($this->getLanguageService()->getLL('clip_deleteMarked')) . '">' . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render(), $table, 'delete', $this->getLanguageService()->getLL('clip_deleteMarkedWarning'));
-                        }
+                        $cells[] = $this->linkClipboardHeaderIcon('<span title="' . htmlspecialchars($this->getLanguageService()->getLL('clip_selectMarked')) . '">' . $this->iconFactory->getIcon('actions-edit-copy', Icon::SIZE_SMALL)->render() . '</span>', $table, 'setCB');
+                        $cells[] = $this->linkClipboardHeaderIcon('<span title="' . htmlspecialchars($this->getLanguageService()->getLL('clip_deleteMarked')) . '">' . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render(), $table, 'delete', $this->getLanguageService()->getLL('clip_deleteMarkedWarning'));
                         $cells[] = '<a class="btn btn-default t3js-toggle-all-checkboxes" data-checkboxes-names="' . htmlspecialchars(implode(',', $this->CBnames)) . '" rel="" href="#" title="' . htmlspecialchars($this->getLanguageService()->getLL('clip_markRecords')) . '">' . $this->iconFactory->getIcon('actions-document-select', Icon::SIZE_SMALL)->render() . '</a>';
                     }
                     $theData[$v] = implode('', $cells);