CoreFiles by mySites.guru
Dispatcher.php43 lines, 1,070 bytes, from Joomla_4.2.7-Stable-Full_Package.zip
Raw History Compare with 4.2.6
md5
5f6dcb5212206a66a9b127aeedb57f2b
sha1
ccbfcbf9cfceb7d354b96b4a77557dfadde653f6
sha256
a5e2b37ea5adddbf0d8b9f01cd08641ac078d5435bf0beb1a688182454d6f477
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_actionlogs
 *
 * @copyright   (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Actionlogs\Administrator\Dispatcher;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Dispatcher\ComponentDispatcher;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * ComponentDispatcher class for com_admin
 *
 * @since  4.2.7
 */
class Dispatcher extends ComponentDispatcher
{
    /**
     * com_admin does not require check permission, so we override checkAccess method and have it empty
     *
     * @return  void
     *
     * @since 4.2.7
     */
    protected function checkAccess()
    {
        $user = $this->app->getIdentity();

        // Access check
        if (!$user->authorise('core.admin', )) {
            throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403);
        }
    }
}

The same content is in 2 releases, Joomla 4.2.7 to 4.2.8. See them all, or every version of this file.