CoreFiles by mySites.guru
Dispatcher.php39 lines, 1,102 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
b079495266b7d84282bc6469bdb824ad
sha1
c56e04a25952ba5ac4df68672bedabac816d19e2
sha256
c07d94165e44cfc82b6d050b934286a39b58dc7922e9fe549ee7e4f6021cb721
<?php

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

namespace Joomla\Component\Workflow\Administrator\Dispatcher;

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.workflow', $parts[0])) {
            throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403);
        }
    }
}

The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.