Commit 3754059d authored by Benni Mack's avatar Benni Mack Committed by Andreas Wolf
Browse files

[BUGFIX] File metadata can’t be edited inline

Since 2012, there is a special mechanism to allow some tables for
editing even if their records reside on a page that is inaccessible for
the user. This is checked for regular forms in
``EditDocumentController``, but the check for inline elements was
missing until this patch.

Resolves: #65563
Releases: master, 6.2
Change-Id: I6d984c28672e2b3ba225ea91f6c7292aa3e1127d
Reviewed-on: http://review.typo3.org/37586

Reviewed-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
Reviewed-by: Daniel Maier's avatarDaniel Maier <dani-maier@gmx.de>
Tested-by: Daniel Maier's avatarDaniel Maier <dani-maier@gmx.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Wolf's avatarAndreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf's avatarAndreas Wolf <andreas.wolf@typo3.org>
parent 9a3ed4b3
......@@ -983,7 +983,7 @@ class EditDocumentController {
}
// Check internals regarding access:
$isRootLevelRestrictionIgnored = BackendUtility::isRootLevelRestrictionIgnored($table);
if ($hasAccess || (string)$calcPRec['pid'] === '0' && $isRootLevelRestrictionIgnored) {
if ($hasAccess || (int)$calcPRec['pid'] === 0 && $isRootLevelRestrictionIgnored) {
$hasAccess = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $calcPRec);
$deniedAccessReason = $GLOBALS['BE_USER']->errorMsg;
}
......
......@@ -644,8 +644,9 @@ class InlineRecordContainer extends AbstractContainer {
$CALC_PERMS = $backendUser->calcPerms(BackendUtility::getRecord('pages', $calcPRec['pid']));
$hasAccess = (bool)($CALC_PERMS & Permission::CONTENT_EDIT);
}
// Check internals regarding access:
if ($hasAccess) {
// Check internals regarding access
$isRootLevelRestrictionIgnored = BackendUtility::isRootLevelRestrictionIgnored($table);
if ($hasAccess|| (int)$calcPRec['pid'] === 0 && $isRootLevelRestrictionIgnored) {
$hasAccess = (bool)$backendUser->recordEditAccessInternals($table, $calcPRec);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment