diff --git a/components/com_config/src/Dispatcher/Dispatcher.php b/components/com_config/src/Dispatcher/Dispatcher.php index 1dc14117ae227..05fc81c7cd1b8 100644 --- a/components/com_config/src/Dispatcher/Dispatcher.php +++ b/components/com_config/src/Dispatcher/Dispatcher.php @@ -34,9 +34,21 @@ protected function checkAccess() { parent::checkAccess(); - if (!$this->app->getIdentity()->authorise('core.admin')) + $user = $this->app->getIdentity(); + + if ($this->input->get('view') === 'modules') + { + if (!$user->authorise('module.edit.frontend', 'com_modules') && !$user->authorise('module.edit.frontend', 'com_modules.module.' . $this->input->get('id'))) + { + throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403); + } + } + else { - throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403); + if (!$this->app->getIdentity()->authorise('core.admin')) + { + throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403); + } } } }