[BUGFIX] Take table permissions in account for file translate icon 71/36471/2
authorPhilipp Thiele <philipp.thiele@phth.de>
Fri, 30 Jan 2015 19:43:52 +0000 (20:43 +0100)
committerFrans Saris <franssaris@gmail.com>
Fri, 30 Jan 2015 19:55:25 +0000 (20:55 +0100)
Hides the translate icon in file list if the user has no
modify permissions for sys_file_metadata

Resolves: #55576
Releases: master
Change-Id: Ida3ea7a437c2b4fb49099ff7a3448ceccf063bd2
Reviewed-on: http://review.typo3.org/36471
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
typo3/sysext/filelist/Classes/FileList.php

index e22ced2..8cd220e 100644 (file)
@@ -634,7 +634,7 @@ class FileList extends AbstractRecordList {
                                                        $theData[$field] = $this->makeClip($fileObject);
                                                        break;
                                                case '_LOCALIZATION_':
-                                                       if (!empty($systemLanguages) && $fileObject->isIndexed() && $fileObject->checkActionPermission('write')) {
+                                                       if (!empty($systemLanguages) && $fileObject->isIndexed() && $fileObject->checkActionPermission('write') && $this->getBackendUser()->check('tables_modify', 'sys_file_metadata')) {
                                                                $metaDataRecord = $fileObject->_getMetaData();
                                                                $translations = $this->getTranslationsForMetaData($metaDataRecord);
                                                                $languageCode = '';