diff --git a/admin/views/types/view.html.php b/admin/views/types/view.html.php index b799e59ce4c..63741af1c45 100644 --- a/admin/views/types/view.html.php +++ b/admin/views/types/view.html.php @@ -40,6 +40,7 @@ function display( $tpl = null ) $jinput = $app->input; $option = $jinput->get('option', '', 'cmd'); $view = $jinput->get('view', '', 'cmd'); + $layout = $jinput->get('layout', 'default', 'cmd'); $cparams = JComponentHelper::getParams( 'com_flexicontent' ); $user = JFactory::getUser(); @@ -114,8 +115,10 @@ function display( $tpl = null ) $perms = FlexicontentHelperPerm::getPerm(); // Create Submenu (and also check access to current view) - FLEXIUtilities::ManagerSideMenu('CanTypes'); - + $layout === 'typeslist' + ? FLEXIUtilities::ManagerSideMenu(null) + : FLEXIUtilities::ManagerSideMenu('CanTypes'); + // Create document/toolbar titles $doc_title = JText::_( 'FLEXI_TYPES' ); $site_title = $document->getTitle(); diff --git a/site/classes/helpers/flexiutilities.php b/site/classes/helpers/flexiutilities.php index 6e906567372..96c662de6f2 100644 --- a/site/classes/helpers/flexiutilities.php +++ b/site/classes/helpers/flexiutilities.php @@ -728,11 +728,19 @@ static function ManagerSideMenu($cando = null) $session = JFactory::getSession(); $cparams = JComponentHelper::getParams( 'com_flexicontent' ); + // Redirect to Joomla backend + if (!$perms->CanManage) + { + $app->redirect('index.php', JText::_('FLEXI_NO_ACCESS'), 'warning'); + } + // Check access to current management tab $is_authorized = $cando === null || $perms->$cando; - if ( !$is_authorized ) + + // Redirect to Flexicontent backend Dashboard + if (!$is_authorized) { - $app->redirect('index.php?option=com_flexicontent', JText::_( 'FLEXI_NO_ACCESS' ), 'warning'); + $app->redirect('index.php?option=com_flexicontent', JText::_('FLEXI_NO_ACCESS'), 'warning'); } // Get post-installation FLAG (session variable), and current view (HTTP request variable)