Index: t3lib/class.t3lib_frontendedit.php =================================================================== --- t3lib/class.t3lib_frontendedit.php (revision 9471) +++ t3lib/class.t3lib_frontendedit.php (working copy) @@ -84,6 +84,9 @@ if ($conf['newRecordFromTable']) { $currentRecord = $conf['newRecordFromTable'] . ':NEW'; $conf['allow'] = 'new'; + $checkEditAccessInternals = FALSE; + } else { + $checkEditAccessInternals = TRUE; } list($table, $uid) = explode(':', $currentRecord); @@ -105,7 +108,7 @@ } } - if ($GLOBALS['TSFE']->displayEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf) && $this->allowedToEditLanguage($table, $dataArray)) { + if ($GLOBALS['TSFE']->displayEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf, $checkEditAccessInternals) && $this->allowedToEditLanguage($table, $dataArray)) { $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit']; if ($editClass) { $edit = t3lib_div::getUserObj($editClass, false); @@ -497,13 +500,22 @@ * @param string The name of the table. * @param array The data array. * @param array The configuration array for the edit panel. + * @param boolean Boolean indicating whether recordEditAccessInternals should not be checked. Defaults + * to true but doesn't makes sense when creating new records on a page. * @return boolean */ - protected function allowedToEdit($table, array $dataArray, array $conf) { + protected function allowedToEdit($table, array $dataArray, array $conf, $checkEditAccessInternals = TRUE) { // Unless permissions specifically allow it, editing is not allowed. - $mayEdit = false; + $mayEdit = FALSE; + if ($checkEditAccessInternals) { + $editAccessInternals = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $dataArray, FALSE, FALSE); + } else { + $editAccessInternals = TRUE; + } + + if ($editAccessInternals) { if ($table=='pages') { // 2 = permission to edit the page if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->doesUserHaveAccess($dataArray, 2)) { @@ -533,6 +545,7 @@ $mayEdit = count($allow) && ($perms & 16); } } + } return $mayEdit; }