CoreFiles by mySites.guru
Dispatcher.php42 lines, 892 bytes, from Joomla_4.0.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta2
md5
c9713e993f76851447623691ffb923dd
sha1
7e2d184a96044d3f8d48123836a0b81c31ec4f2d
sha256
e1899c3258fa7d99ca5a8abc9f627c1a2806a67666a98bcbf006cd3c8f2a59ed
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_config
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Config\Site\Dispatcher;

\defined('_JEXEC') or die;

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

/**
 * ComponentDispatcher class for com_config
 *
 * @since  4.0.0
 */
class Dispatcher extends ComponentDispatcher
{
	/**
	 * Method to check component access permission
	 *
	 * @since   4.0.0
	 *
	 * @return  void
	 *
	 * @throws  Exception|NotAllowed
	 */
	protected function checkAccess()
	{
		parent::checkAccess();

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

The same content is in 3 releases, Joomla 4.0.0-beta2 to 4.0.0-beta4. See them all, or every version of this file.