#71319IRRE in sys_file_metadata doesn't work for normal users
Description
I extended the sys_file_metadata table with an inline field to add some object relations to a file’s meta data. This doesn’t work for normal users (admins have no problems). By adding a new Relation with the ajax call comes an error and no relation is generated. This causes an “access denied” pop up for the user.
I found the reason for this in the class TYPO3\CMS\Backend\Form\Element\InlineElement. The function checkAccess() returns false in every case because of these lines (2111 to 2114):
$calcPRec = BackendUtility::getRecord('pages', $this->inlineFirstPid);
if (!is_array($calcPRec)) {
return FALSE;
}
$this->inlineFirstPid is 0 in case of adding an inline element.
The popup message is called in line 1266 in the createNewRecord() function (TYPO3\CMS\Backend\Form\Element\InlineElement), which is called by ajax in this case.
$item = $this->renderForeignRecord($parent['uid'], $record, $config);
if ($item === FALSE) {
return $this->getErrorMessageForAJAX('Access denied');
}Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 4
- Bug #75332Saving relations to files in sys_file_metadata does not work for normal users
- Bug #75748Editor can't remove images attached to other images
- Bug #76229Missing edit options for non-admin users on references to sys_file_metadata
- Bug #81308Deleting a referenced file via filelist module, definined in sys_file_metadata