diff --git a/dca/tl_content.php b/dca/tl_content.php index ad21e35..a98f3d4 100644 --- a/dca/tl_content.php +++ b/dca/tl_content.php @@ -16,6 +16,7 @@ $GLOBALS['TL_DCA']['tl_content']['config']['onsubmit_callback'][] = array('MadeYourDay\Contao\CustomElements', 'onsubmitCallback'); $GLOBALS['TL_DCA']['tl_content']['fields']['rsce_data'] = array( 'label' => &$GLOBALS['TL_LANG']['tl_content']['rsce_data'], + 'exclude' => true, 'inputType' => 'rsce_list_hidden', 'sql' => "mediumblob NULL", 'save_callback' => array( diff --git a/dca/tl_module.php b/dca/tl_module.php index caaaf36..b196a02 100644 --- a/dca/tl_module.php +++ b/dca/tl_module.php @@ -16,6 +16,7 @@ $GLOBALS['TL_DCA']['tl_module']['config']['onsubmit_callback'][] = array('MadeYourDay\Contao\CustomElements', 'onsubmitCallback'); $GLOBALS['TL_DCA']['tl_module']['fields']['rsce_data'] = array( 'label' => &$GLOBALS['TL_LANG']['tl_module']['rsce_data'], + 'exclude' => true, 'inputType' => 'rsce_list_hidden', 'sql' => "mediumblob NULL", 'save_callback' => array( diff --git a/src/MadeYourDay/Contao/CustomElements.php b/src/MadeYourDay/Contao/CustomElements.php index 9ac5f42..ea9af75 100644 --- a/src/MadeYourDay/Contao/CustomElements.php +++ b/src/MadeYourDay/Contao/CustomElements.php @@ -456,6 +456,13 @@ protected function createDcaItem($fieldPrefix, $fieldName, $fieldConfig, &$palet ); } + if ( + !\BackendUser::getInstance()->hasAccess($dc->table . '::rsce_data', 'alexf') + && $fieldConfig['inputType'] !== 'standardField' + ) { + return; + } + if (isset($fieldConfig['label'])) { $fieldConfig['label'] = static::getLabelTranslated($fieldConfig['label']); }