Actions
Bug #43429
closededitPanel / editIcons: ts setting 'onlyCurrentPid = 1' ignored
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2012-11-29
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
The sub setting 'onlyCurrentPid = 1' for editPanel / editIcons is ignored.
class.t3lib_frontendedit.php / function allowedToEdit:
if ($editAccessInternals) { if ($table == 'pages') { // 2 = permission to edit the page if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->doesUserHaveAccess($dataArray, 2)) { $mayEdit = TRUE; } } else { // 16 = permission to edit content on the page if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->doesUserHaveAccess(t3lib_BEfunc::getRecord('pages', $dataArray['pid']), 16)) { $mayEdit = TRUE; } } if (!$conf['onlyCurrentPid'] || ($dataArray['pid'] == $GLOBALS['TSFE']->id)) { // Permissions: $types = t3lib_div::trimExplode(',', t3lib_div::strtolower($conf['allow']), 1); $allow = array_flip($types); $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page); if ($table == 'pages') { $allow = $this->getAllowedEditActions($table, $conf, $dataArray['pid'], $allow); // Can only display editbox if there are options in the menu if (count($allow)) { $mayEdit = TRUE; } } else { $mayEdit = count($allow) && ($perms & 16); } } } return $mayEdit;
Maybe I don't understand the concept, but im my opinion
$GLOBALS['BE_USER']->doesUserHaveAccess(t3lib_BEfunc::getRecord('pages', $dataArray['pid']), 16) is a necessary but not sufficient condition to set $mayEdit to TRUE. My suggestion:
if ($GLOBALS['BE_USER']->isAdmin() || ($GLOBALS['BE_USER']->doesUserHaveAccess(t3lib_BEfunc::getRecord('pages', $dataArray['pid']), 16) && !$conf['onlyCurrentPid'])) { $mayEdit = TRUE; }
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 7.2 (Frontend)
- Is Regression set to No
Updated by Benni Mack over 9 years ago
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 7 LTS
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63616
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63616
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63744
Updated by Benni Mack over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 585287e95ad376c3ebe632d740f40f4324f09895.
Actions