CoreFiles by mySites.guru
Dispatcher.php43 lines, 1,020 bytes, from Joomla_6.0.2-Stable-Full_Package.zip
Raw History Compare with 6.0.1
md5
efc3bfd787cc973a63d417c0f7211290
sha1
37f952e8a1fcb755a391b20c8433ec9748692121
sha256
2e2a3a03666d4fd1a85c965199d5802cfc5670dd60cedc1641d89c0fec17d39f
<?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_actionlogs
 *
 * @since  4.2.7
 */
class Dispatcher extends ComponentDispatcher
{
    /**
     * Method to check component access permission
     *
     * @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 197 releases, Joomla 4.3.3-rc1 to 6.3.0-alpha1. See them all, or every version of this file.