Issue Bug Closed

#90164Page module: Buttons in tt_content_drawHeader() not shown if editor has no permissions to default language

Christian Eßl 01/21/20, 14:02 updated 02/27/20, 12:43

Description

The following scenario:
  • A site with the languages “default” and “german”
  • The configured backend editor has edit permissions for the language “german”, but not for “default”.
  • Now open the page module as the editor
  • In the select box, switch from “Columns” mode to “Languages” mode.
  • The shown content elements for the “german” language will NOT show the usual buttons in their top bar (edit, show/hide, delete).
    If the editor has permissions for both “default” and “german”, he can see the buttons for both languages.

The reason for this behaviour lies in the PageLayoutController.php. Here the property $this->EDIT_CONTENT is saved, which holds the value, if the editor should be allowed to edit a content element. The PageLayoutView later receives this value in its property $doEdit.
In “Languages” mode, you will always see both the default language and the language that is chosen in the second select. But if this mode is chosen, $this->EDIT_CONTENT will always use the default language for determining, if an editor should be allowed to edit content. But these permissions should be checked independently for each language.

Reviews 2