Project

General

Profile

Bug #91900 » nonDefaultLanguageAccess.diff

Kevin Ditscheid, 2022-10-21 06:45

View differences:

Classes/Form/FormDataProvider/DatabaseUserPermissionCheck.php (date 1666268565934)
// If general access is allowed, check "recordEditAccessInternals"
$userHasAccess = $backendUser->recordEditAccessInternals($result['tableName'], $result['databaseRow']);
if (!$userHasAccess) {
$exception = new AccessDeniedEditInternalsException(
$backendUser->errorMsg,
1437687404
);
if (
isset($result['inlineParentConfig']) &&
$result['inlineParentConfig']['inline']['parentSysLanguageUid'] !== 0 &&
$result['databaseRow']['sys_language_uid'] === 0
) {
// probably an inline record preview, which would break the edit view for editors who are
// restricted to a non default language
$userHasAccess = true;
} else {
$exception = new AccessDeniedEditInternalsException(
$backendUser->errorMsg,
1437687404
);
}
}
}
}
(3-3/3)