Issue Bug Closed

#87262Wrong permissions calculated for sys_file_reference record in sys_file_metadata record

Kai Strecker 12/21/18, 15:23 updated 02/19/22, 13:47

Description

We extended the sys_file_metadata table with an extension, so we can manually set a preview image for files like pdfs.

When we edit a file, we can now create a sys_file_reference in its sys_file_metadata record. But for those sys_file_reference records, the edit permissions are calculated incorrectly.

The problem is in file typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php in line 535.

When you are editing a sys_file_reference record, the edit permissions are calculated by the permissions set on the page, on which the sys_file_reference record is.

But if you edit a sys_file_reference while being in the file list, your sys_file_reference is not on a page.

In my opinion this requires an additional check, whether the sys_file_reference record is on a page.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.