Index: classes/class.tx_templavoila_template.php =================================================================== --- classes/class.tx_templavoila_template.php (revision 38835) +++ classes/class.tx_templavoila_template.php (working copy) @@ -245,14 +245,21 @@ $permission = TRUE; $denyItems = tx_templavoila_div::getDenyListForUser(); - $currentSetting = $parentRow['tx_templavoila_to']; - if ($this->getScope() == tx_templavoila_datastructure::SCOPE_PAGE) { + + if (isset($parentRow['tx_templavoila_to'])) { + $currentSetting = $parentRow['tx_templavoila_to']; + } else { + $currentSetting = $this->getKey(); + } + + if (isset($parentRow['tx_templavoila_next_to']) && + $this->getScope() == tx_templavoila_datastructure::SCOPE_PAGE) { $inheritSetting = $parentRow['tx_templavoila_next_to']; } else { $inheritSetting = -1; } - $key = 'tx_templavoila_tmplobj:' . $this->getKey(); + $key = 'tx_templavoila_tmplobj_' . $this->getKey(); if (in_array($key, $denyItems) && $key != $currentSetting && $key != $inheritSetting Index: mod1/class.tx_templavoila_mod1_wizards.php =================================================================== --- mod1/class.tx_templavoila_mod1_wizards.php (revision 38835) +++ mod1/class.tx_templavoila_mod1_wizards.php (working copy) @@ -306,13 +306,16 @@ $toRepo = t3lib_div::makeInstance('tx_templavoila_templateRepository'); $dsList = $dsRepo->getDatastructuresByStoragePidAndScope($storageFolderPID, tx_templavoila_datastructure::SCOPE_PAGE); foreach($dsList as $dsObj) { - if (t3lib_div::inList($disallowedPageTemplateItems, $dsObj->getKey())) { + if (t3lib_div::inList($disallowedPageTemplateItems, $dsObj->getKey()) || + !$dsObj->isPermittedForUser() + ) { continue; } $toList = $toRepo->getTemplatesByDatastructure($dsObj, $storageFolderPID); foreach ($toList as $toObj) { if ($toObj->getKey() === $defaultTO['uid'] || + !$toObj->isPermittedForUser() || t3lib_div::inList($disallowedDesignTemplateItems, $toObj->getKey()) ) { continue; Index: mod1/db_new_content_el.php =================================================================== --- mod1/db_new_content_el.php (revision 38835) +++ mod1/db_new_content_el.php (working copy) @@ -478,13 +478,15 @@ $toRepo = t3lib_div::makeInstance('tx_templavoila_templateRepository'); $toList = $toRepo->getTemplatesByStoragePidAndScope($storageFolderPID, tx_templavoila_datastructure::SCOPE_FCE); foreach ($toList as $toObj) { - $tmpFilename = $toObj->getIcon(); - $returnElements['fce.']['elements.']['fce_' . $toObj->getKey() . '.'] = array( - 'icon' => (@is_file(PATH_site . substr($tmpFilename, 3))) ? $tmpFilename : ('../' . t3lib_extMgm::siteRelPath('templavoila') . 'res1/default_previewicon.gif'), - 'description' => $toObj->getDescription() ? htmlspecialchars($toObj->getDescription()) : $GLOBALS['LANG']->getLL('template_nodescriptionavailable'), - 'title' => $toObj->getLabel(), - 'params' => $this->getDsDefaultValues( $toObj ) - ); + if ($toObj->isPermittedForUser()) { + $tmpFilename = $toObj->getIcon(); + $returnElements['fce.']['elements.']['fce_' . $toObj->getKey() . '.'] = array( + 'icon' => (@is_file(PATH_site . substr($tmpFilename, 3))) ? $tmpFilename : ('../' . t3lib_extMgm::siteRelPath('templavoila') . 'res1/default_previewicon.gif'), + 'description' => $toObj->getDescription() ? htmlspecialchars($toObj->getDescription()) : $GLOBALS['LANG']->getLL('template_nodescriptionavailable'), + 'title' => $toObj->getLabel(), + 'params' => $this->getDsDefaultValues( $toObj ) + ); + } } return $returnElements; }