[TYPO3-dev] Extending sys_file_metadata/permission problems

bernd wilke t3ng at bernd-wilke.net
Mon Mar 9 08:17:56 CET 2015


Am 06.03.15 um 20:28 schrieb Frank Schüßler:
> 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??

have you defined those fields as exclude fields?
then you have to enable these fields for normal editors by granting 
access either to the BE-user or the BE-group.

http://docs.typo3.org/typo3cms/extensions/doc_tut_backend/BackendProgramming/TcaTheColumnsSection/TheExcludeFields/Index.html

bernd
-- 
http://www.pi-phi.de/cheatsheet.html



More information about the TYPO3-dev mailing list