Skip to content

Commit

Permalink
Fixed frontend module editing permissions. (#30778)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmageddon committed Oct 30, 2020
1 parent 46ac9fc commit a907b4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions components/com_config/controller/modules/display.php
Expand Up @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions components/com_config/controller/modules/save.php
Expand Up @@ -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');
}

Expand Down

0 comments on commit a907b4c

Please sign in to comment.