FOF30\Platform\Joomla\Platform::authorizeAdmin PHP Метод

authorizeAdmin() публичный Метод

Authorise access to the component in the back-end.
См. также: PlatformInterface::authorizeAdmin()
public authorizeAdmin ( string $component ) : boolean
$component string The name of the component.
Результат boolean True to allow loading the component, false to halt loading
    public function authorizeAdmin($component)
    {
        if ($this->isBackend()) {
            // Master access check for the back-end, Joomla! 1.6 style.
            $user = \JFactory::getUser();
            if (!$user->authorise('core.manage', $component) && !$user->authorise('core.admin', $component)) {
                return false;
            }
        }
        return true;
    }