Skip to content

Commit

Permalink
[BUGFIX] Revert FolderCheck for clipboard actions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
brandung-gs authored and bmack committed Dec 16, 2019
1 parent aaca0b7 commit fef7859
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions typo3/sysext/filelist/Classes/FileList.php
Expand Up @@ -500,12 +500,8 @@ public function getTable($rowlist)
}
}
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);
Expand Down

0 comments on commit fef7859

Please sign in to comment.