Commit 7d3166eb authored by Gianluigi Martino's avatar Gianluigi Martino Committed by Markus Klein
Browse files

[BUGFIX] Show new content button for editors in page module again

Editors (group) doesn't see the new content button without page edit
permission in page module. with this bugfix editors can insert new content
again.

Change-Id: Ie8957b3386dfca8a91b7718bedba16af7559b373
Resolves: #76036
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/48057

Reviewed-by: Adrian Mot's avatarAdrian Mot <adrian.mot@gmail.com>
Tested-by: Adrian Mot's avatarAdrian Mot <adrian.mot@gmail.com>
Reviewed-by: default avatarGianluigi Martino <gmartino27@gmail.com>
Tested-by: default avatarGianluigi Martino <gmartino27@gmail.com>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
parent 82afb8f6
......@@ -1371,7 +1371,7 @@ class PageLayoutController
*
* @return bool
*/
protected function contentIsNotLockedForEditors()
public function contentIsNotLockedForEditors()
{
return $this->getBackendUser()->isAdmin() || ($this->CALC_PERMS & Permission::CONTENT_EDIT) === Permission::CONTENT_EDIT && !$this->pageinfo['editlock'];
}
......
......@@ -524,8 +524,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$content[$key] .= '">';
// Add new content at the top most position
$link = '';
if ($this->getPageLayoutController()->pageIsNotLockedForEditors()
&& $this->getBackendUser()->doesUserHaveAccess($this->pageinfo, Permission::CONTENT_EDIT)
if ($this->getPageLayoutController()->contentIsNotLockedForEditors()
&& (!$this->checkIfTranslationsExistInLanguage($contentRecordsPerColumn, $lP))
) {
if ($this->option_newWizard) {
......@@ -638,8 +637,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
'-' . StringUtility::getUniqueId() . '">';
// Add icon "new content element below"
if (!$disableMoveAndNewButtons
&& $this->getPageLayoutController()->pageIsNotLockedForEditors()
&& $this->getBackendUser()->doesUserHaveAccess($this->pageinfo, Permission::CONTENT_EDIT)
&& $this->getPageLayoutController()->contentIsNotLockedForEditors()
&& (!$this->checkIfTranslationsExistInLanguage($contentRecordsPerColumn, $lP))
) {
// New content element:
......
Supports Markdown
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