[TYPO3-dev] Changing TCA for certain BE users/groups
Steffen Müller
typo3 at t3node.com
Fri Feb 13 16:55:28 CET 2009
Hi Masi,
On 13.02.2009 12:13 Martin Kutschker wrote:
> Probably better. If a field is defined readOnly by the extension author
> then there must be a reason for it. So TS shouldn't make it readable.
>
I disagree.
Making it configurable means more control for admins. Admin could also
have a reason for disabling readOnly.
> OTOH, it should be possible to mark a field as read-only by TS.
I have found a solution:
t3lib_tceforms->allowOverrideMatrix (see code below) is a whitelist to
restrict TCA field configuration to be overridden by TSconfig. The key
readOnly is not in the whitelist, which prevents me from simply using:
TCEFORM.tx_myext_tbl.myfield.config.readOnly = 1
--
cheers,
Steffen
t3lib_tceforms->allowOverrideMatrix:
// Define whitelist that allows TCA field configuration to be overridden
by TSconfig, @see overrideFieldConf():
$this->allowOverrideMatrix = array(
'input' => array('size', 'max'),
'text' => array('cols', 'rows', 'wrap'),
'check' => array('cols', 'showIfRTE'),
'select' => array('size', 'autoSizeMax', 'maxitems', 'minitems'),
'group' => array('size', 'autoSizeMax', 'max_size', 'show_thumbs',
'maxitems', 'minitems', 'disable_controls'),
'inline' => array('appearance', 'behaviour', 'foreign_label',
'foreign_selector', 'foreign_unique', 'maxitems', 'minitems', 'size',
'autoSizeMax', 'symmetric_label'),
);
More information about the TYPO3-dev
mailing list