CoreFiles by mySites.guru
Dispatcher.php39 lines, 1,125 bytes, from Joomla_4.3.2-Stable-Full_Package.zip
Raw History Compare with 4.3.1
md5
68bae775c39457c36e716eed90881672
sha1
0c24f88bcface79c44463742862e465b7c222294
sha256
51f720da67ba56eddbf82e7b62a7a437e90dd328522dbed6d7e40f2928109af4
<?php

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

namespace Joomla\Component\Joomlaupdate\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.0.0
 */
class Dispatcher extends ComponentDispatcher
{
    /**
     * Joomla Update is checked for global core.admin rights - not the usual core.manage for the component
     *
     * @return  void
     */
    protected function checkAccess()
    {
        // Check the user has permission to access this component if in the backend
        if ($this->app->isClient('administrator') && !$this->app->getIdentity()->authorise('core.admin')) {
            throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403);
        }
    }
}

The same content is in 31 releases, Joomla 4.2.1 to 5.0.0-alpha1. See them all, or every version of this file.