CoreFiles by mySites.guru
Dispatcher.php41 lines, 1,072 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
a2a861122ee41a3e88de45f82da7ec11
sha1
b71ffc5db244fc9b483a6e05e74d7413ce8a75cd
sha256
86e5be143061fe3220c9a9294a82c5348265e4d90f4ca29f11a7cd2b825103a2
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_workflow
 *
 * @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\Workflow\Administrator\Dispatcher;

\defined('_JEXEC') or die;

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

/**
 * ComponentDispatcher class for com_workflow
 *
 * @since  4.0.0
 */
class Dispatcher extends ComponentDispatcher
{
	/**
	 * Workflows have to check for extension permission
	 *
	 * @return  void
	 */
	protected function checkAccess()
	{
		$extension = $this->getApplication()->input->getCmd('extension');

		$parts = explode('.', $extension);

		// Check the user has permission to access this component if in the backend
		if ($this->app->isClient('administrator') && !$this->app->getIdentity()->authorise('core.manage', $parts[0]))
		{
			throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403);
		}
	}
}

No other release has this exact content. See every version of this file.