RestService :: isAdmin: Bitrix method

      
<?php 
//  Bitrix\Bizproc\RestService :: isAdmin()
//  /dist/bitrix/modules/bizproc/lib/restservice.php:1302

    
private static function isAdmin()
    {
        global 
$USER;
        return (
            isset(
$USER)
            && 
is_object($USER)
            && (
                
$USER->isAdmin()
                || 
Loader::includeModule('bitrix24') && \CBitrix24::isPortalAdmin($USER->getID())
            )
        );
    }