diff --git a/components/com_config/controller/modules/display.php b/components/com_config/controller/modules/display.php index 7d100e54daf36..7ddf6fbb8f92e 100644 --- a/components/com_config/controller/modules/display.php +++ b/components/com_config/controller/modules/display.php @@ -89,8 +89,7 @@ public function execute() // Access check. $user = JFactory::getUser(); - if (!$user->authorise('module.edit.frontend', 'com_modules.module.' . $serviceData['id']) - && !$user->authorise('module.edit.frontend', 'com_modules')) + if (!$user->authorise('module.edit.frontend', 'com_modules.module.' . $serviceData['id'])) { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $app->redirect($redirect); diff --git a/components/com_config/controller/modules/save.php b/components/com_config/controller/modules/save.php index a9d697f5a17c5..750b0c6b1a0b2 100644 --- a/components/com_config/controller/modules/save.php +++ b/components/com_config/controller/modules/save.php @@ -37,10 +37,9 @@ public function execute() // Check if the user is authorized to do this. $user = JFactory::getUser(); - if (!$user->authorise('module.edit.frontend', 'com_modules.module.' . $this->input->get('id')) - && !$user->authorise('module.edit.frontend', 'com_modules')) + if (!$user->authorise('module.edit.frontend', 'com_modules.module.' . $this->input->get('id'))) { - $this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR')); + $this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $this->app->redirect('index.php'); }