Bug #67399
closedEpic #90674: Backend UI not reflecting permissions
BE editor with rights to edit single locale sees "All" in languages drop-down
0%
Description
Hi,
We're configuring BE editor groups in a multi-language website. The goal is to give editors access only to those locales, they belong to. This is easily managed by languagess access list in be_groups.
So far so good, until editor wants to create a new record of our custom type.
The usual TCA for our custom records contains such a configuration for sys_language_uid field:
'sys_language_uid' => [ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', 'config' => [ 'readOnly' => TRUE, 'type' => 'select', 'foreign_table' => 'sys_language', 'foreign_table_where' => 'ORDER BY sys_language.title', 'items' => [ ['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1], ['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0] ], ], ],
So, it is possible to select [All] as language for a record, which is okay for an admin, but not okay for editor, limited to single locale. Due to a fact, that this field is read-only, default selected value is [All], which allows editor to create a new record for all languages, but then he can't edit it due to permissions.
Sure, we can disable readOnly flag and educate editors to select always their language instead of default [All], but this sounds redundantly and still allows editors to set [All], as language.
Current workaround is in adding:
'authMode' => 'individual',
and
['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1, '', '', 'EXPL_ALLOW'],
TYPO3 6.2.12