[TYPO3-dev] Extending sys_file_metadata/permission problems
Frank SchüÃler
typo3 at frankschuessler.de
Fri Mar 6 20:28:13 CET 2015
Hi all,
i have extended the sys_file_metadata table with 2 fields which are file relations just like the extension "media" does.
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, i get an "Access Denied" alert and can not save the relation.
I think it has todo with root level restrictions, because sys_file_reference records are stored on pid=0, but i can't find a working solution...
The same issue happens, if i install the "media" extension, which herself extends sys_file_metadata as well in the same manner.
I tried to set some TCA configs like
$TCA['sys_file']['ctrl']['security']['ignoreRootLevelRestriction'] = 1;
$TCA['sys_file']['ctrl']['rootLevel'] = -1;
$TCA['sys_file_metadata']['ctrl']['security']['ignoreRootLevelRestriction'] = 1;
$TCA['sys_file_metadata']['ctrl']['rootLevel'] = -1;
$TCA['sys_file_reference']['ctrl']['security']['ignoreRootLevelRestriction'] = 1;
$TCA['sys_file_reference']['ctrl']['rootLevel'] = -1;
but without success.
I also tried to find the "Access Denied" alert in Core JS, locallang and PHP files to get a glue, where the restriction is coded, but with no success as well...
The only working solution is to log in as admin or give al normal users admin permissions, but this is not an (longterm) option for the actual
project.
Maybe anybody has an idea??
Cheers,
Frank
More information about the TYPO3-dev
mailing list