[TYPO3-english] BE editor with rights to edit single locale shouldn't see "All" in languages drop-down

Viktor Livakivskyi invisible.kinder at gmail.com
Mon Jun 8 20:08:09 CEST 2015


Hi, list.

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'],

But a questions is: is it me doing this wrong or is it bug and I should report it?


More information about the TYPO3-english mailing list