Actions
Bug #75332
closedSaving relations to files in sys_file_metadata does not work for normal users
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2016-03-31
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
TYPO3 6.2.19
I have extended the sys_file_metadata table with a field which is a file relation.
When I am logged in as admin user everything works fine, I can create relations to other files and store them.
When I am logged in as a normal, nonadmin user (with all possible access rights), I get an "Access Denied" alert and can not save the relation.
Here a minimal setup:
myext/Configuration/Overrides/sys_file_reference.php
<?php if (!defined('TYPO3_MODE')) die ('Access denied.'); $tca = array( 'ctrl' => array( 'rootLevel' => -1, // Otherwise File Reference will not work between files. ), ); // Disable the File Upload in IRRE since it can not be configured the target storage. $GLOBALS['TCA']['sys_file_reference']['columns']['uid_local']['config']['appearance']['fileUploadAllowed'] = FALSE; \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['sys_file_reference'], $tca);
myext/Configuration/Overrides/sys_file_metadata.php
<?php if (!defined('TYPO3_MODE')) die ('Access denied.'); if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('filemetadata')) { $configuration = '--div--;LLL:EXT:hszg_documents/Resources/Private/Language/locallang.xlf:tab.documents, files'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('sys_file_metadata', $configuration); }
Files
Actions