Tells if a node, in general, has access restrictions, independent of the
current security context.

@return boolean
555666
public function hasAccessRestrictions()
    {
        if (!is_array($this->accessRoles) || empty($this->accessRoles)) {
            return false;
        }
        if (count($this->accessRoles) === 1 && in_array('Neos.Flow:Everybody', $this->accessRoles)) {
            return false;
        }

        return true;
    }
1229493
public function is_locked() {
        if ($this->_locked) {
            return true;
        }

        if ($parent = $this->get_parent_context()) {
            return $parent->is_locked();
        }

        return false;
    }
416417
public function isAuthorized()
    {
        /** @var Rbac $rbac */
        $rbac = $this->getContainer()->get('rbac');

        /** @var Auth $auth */
        $auth = $this->getContainer()->get('auth');
        foreach ($auth->getStorage()->read()['roles'] as $roleName) {
            if (true === $rbac->isGranted($roleName, 'admin.panel.view')) {
                return true;
            }
        }

        return false;
    }
443942
public function canAccess()
    {
        //Check if the user needs to be authentic to access
        if($this->hasProperty('access') && !empty($this->access))
        {
            if(!$this->getObject('user')->isAuthentic()) {
                return false;
            }
        }

        //Check if the user is in the group(s) to access
        if($this->hasProperty('access_group') && !empty($this->access_group))
        {
            $groups = $this->getObject('user')->getGroups();

            if(!in_array($this->access_group, $groups)) {
                return false;
            }
        }

        //Check if the user has the right role(s) to access
        if($this->hasProperty('access_role') && !empty($this->access_role))
        {
            if(!$this->getObject('user')->hasRole($this->access_role)) {
                return false;
            }
        }

        return true;
    }
936416
public function isIpAllowed()
    {
        if ($ipString = $this->getConfigValue(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_IP_RESTRICTION_ADDRESSES,
            'default'
        )
        ) {
            //string to array
            $ipArray = explode(',', $ipString);

            //remove white spaces
            foreach ($ipArray as $key => $ip) {
                $ipArray[$key] = trim($ip);
            }

            //ip address
            $ipAddress = $this->_remoteAddress->getRemoteAddress();

            if (in_array($ipAddress, $ipArray)) {
                return true;
            }
        } else {
            //empty ip list from configuration will ignore the validation
            return true;
        }

        $this->log(sprintf("Failed to authenticate IP address - %s", $ipAddress));

        return false;
    }
151066
protected function checkSecurity()
    {
        if (!$this->levelSecure || $this->levelSecure === self::BOTH) {
            return true;
        }

        $secure = Request::is('secure');

        return ($this->levelSecure === self::SECURE && $secure) ||
               ($this->levelSecure === self::NONSECURE && !$secure);
    }
493499
public function canHandle(): bool
    {
        if ($this->table !== 'pages') {
            return false;
        }

        if (!$this->backendUser->isAdmin()) {
            return false;
        }

        /** @var $rootPageResolver RootPageResolver */
        $rootPageResolver = GeneralUtility::makeInstance(RootPageResolver::class);
        return $rootPageResolver->getIsRootPageId((int)$this->identifier);
    }
598211
protected function isAllowed()
    {
        /** @var  \Arcanesoft\Contracts\Auth\Models\User  $user */
        if (is_null($user = auth()->user()))
            return false;

        return $user->isAdmin() || $user->isModerator();
    }
456605
public function hasPermissions() {
        return $this->action->usesPermissions()
            ? Auth::user()->hasPermissions($this->action->getPermissions())
            : true;
    }
66873
public function can_access() {
        if ($this->canaccess === null) {
            $this->canaccess = can_access_course($this->record);
        }
        return $this->canaccess;
    }
1153208
public function hasWriteAccess() : bool
   {

      return $this->isOpen()
         && (
               $this->access == static::ACCESS_WRITE
            || $this->access == static::ACCESS_READWRITE
         );

   }
1050449
public function isBypassEnabled() {
        $cookieName = Mage::helper('turpentine/data')->getBypassCookieName();
        $cookieValue = Mage::getModel('core/cookie')->get($cookieName);

        return $cookieValue === $this->getSecretHandshake();
    }
994509
public function canApply()
    {
        $nodeType = $this->getSubject()->getNodeType();

        return $this->getSiblingNode()->getParent()->isNodeTypeAllowedAsChildNode($nodeType);
    }
1330646
protected function allowedIpAddress()
    {
        if ($this->config->allowIpAddresses && is_array($this->getAllowedIpAddresses())) {
            if (in_array($_SERVER['REMOTE_ADDR'], $this->getAllowedIpAddresses())) {
                return true;
            }
        }

        return false;
    }
755248
public function isHintEnabled()
    {
        $isParamPresent = $this->_request->getParam('ath', false) === '1';

        if ($isParamPresent) {
            $applicationMode = $this->appState->getMode();
            $storeId = $this->storeManager->getStore()->getId();

            if ($applicationMode === AppState::MODE_DEVELOPER || $this->developerHelper->isDevAllowed($storeId)) {
                return true;
            }
        }

        return false;
    }
522721
public function isSecureConnection()
    {
        return isset($_SERVER['HTTPS']) && (strcasecmp($_SERVER['HTTPS'], 'on') === 0 || $_SERVER['HTTPS'] == 1)
        || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
    }
1103648
public function isPrivate(): bool
    {
        if ($this->is_private !== null) {
            return $this->is_private;
        }

        $this->is_private = false;
        foreach (static::$private_ranges as $range) {
            if ($this->isIn($range)) {
                $this->is_private = true;
                break;
            }
        }

        return $this->is_private;
    }