Project

General

Profile

Actions

Bug #87223

closed

Translated root-page record of BE-User cannot be edited/saved (missing webmount)

Added by Philipp Seiler over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2018-12-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
backend,page,tree,translation,permission,webmount,mount
Complexity:
Is Regression:
Sprint Focus:

Description

  • Use Backend as a non-admin BE-User.
  • This backend user has a root page as the DB-Mount (webmount).
  • This root page has some subpages.
  • The root page is translated into any different language.
  • Translate any subpage.
  • Edit/save any subpage.
  • In \TYPO3\CMS\Core\Authentication\BackendUserAuthentication the method isInWebMount checks if the page being edited is in any allowed webmount.
  • At first, all webmounts from the user permissions are retrieved. Note that ONLY the root language version UIDs of selected webmounts are found!
  • Within that method, BackendUtility::BEgetRootLine returns the rootline up to the root page.
  • If a page of the rootline is within the users lists of webmounts, the record can be edited.

This is OK.

Translated root page cannot be edited/saved

  • Root page is also translated.
  • Edit root page with the BE-User: Attempt to modify record 'Home' (pages:123) without permission. Or non-existing page.
  • Again the method isInWebMount checks if the page can be edited.
  • Again the allowed webmounts of the user are retrieved. Again ONLY the root language version UID of selected webmounts are found!
  • Rootline only returns one element, as we are already on the root page. The returned page is the translated root page!
  • That translated root page however has a different UID than defined in the webmounts! The webmount UID is that of the root language version.
  • Therefore no valid webmount is found.

When checking for permissions, translated pages need to be taken into account!

Workaround

Adjust \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::isInWebMount() so that translated webroots are also selected.

$wM = $this->returnWebmounts();
$rL = BackendUtility::BEgetRootLine($id, ' AND ' . $readPerms);

// Fix bug with UID of translated webmount not taken into account
$wM = $this->addTranslatedWebmounts($wM);

foreach ($rL as $v) {
    if ($v['uid'] && in_array($v['uid'], $wM)) {
        return $v['uid'];
    }
}

Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #87165: \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::isInWebMount does not work for translations of web mounts for non admin usersClosedAlexander Bohndorf2018-12-14

Actions
Related to TYPO3 Core - Bug #88509: Editor cannot modify values for db mount translationClosed2019-06-06

Actions
Has duplicate TYPO3 Core - Bug #86575: Missing page access for root-page translationsClosed2018-10-05

Actions
Has duplicate TYPO3 Core - Bug #87985: Permission issue on root page for non-admins on multilanguage environmentClosed2019-03-22

Actions
Actions

Also available in: Atom PDF