Method checks if Amazon Login button can be showed

@return bool
@throws oxSystemComponentException
171975
public function showAmazonLoginButton()
    {
        return (
            $this->isActive() === true
            && (bool)$this->getConfig()->isSsl() === true
            && $this->getActiveUser() === false
            && (string)$this->getConfig()->getRequestParameter('cl') !== 'basket'
            && (string)$this->getConfig()->getRequestParameter('cl') !== 'user'
        );
    }
501068
private function loginWithRsaKey()
    {
        $key = new RSA();
        $password = $this->sshConfig['rsakey']['password'];
        if ($password) {
            if (!is_string($password)) {
                $password = $this->askForPassword(
                    sprintf('Password for file "%s": ', $this->sshConfig['rsakey']['file'])
                );
            }

            $key->setPassword($password);
        }

        $key->loadKey(file_get_contents($this->sshConfig['rsakey']['file']));
        if (!$this->ssh->login($this->sshConfig['username'], $key)) {
            throw new SshLoginException($this->name);
        }

        return true;
    }
780275
function isBannable() {
        if($this->id === $this->guild->ownerID || $this->id === $this->client->user->id) {
            return false;
        }
        
        $member = $this->guild->me;
        if(!$member->permissions->has(\CharlotteDunois\Yasmin\Models\Permissions::PERMISSIONS['BAN_MEMBERS'])) {
            return false;
        }
        
        return ($member->getHighestRole()->comparePositionTo($this->getHighestRole()) > 0);
    }
1280049
protected function isRegistrationEnabled()
    {
        $router = $this->container->get('router');

        if (get_class($router) == 'JMS\I18nRoutingBundle\Router\I18nRouter') {
            $routes = $router->getOriginalRouteCollection();
        } else {
            $routes = $router->getRouteCollection();
        }

        return (null !== $routes->get('fos_user_registration_register'));
    }
605421
public static function isEnabled()
    {
        if (!self::$_checkedEnabled) {
            self::$_checkedEnabled = true;

            $conf = self::getConfiguration();

            $enabled = false;
            if (strtolower($conf->trigger) == 'always') {
                $enabled = true;
            } elseif (strtolower($conf->trigger) == 'parameter') {
                if ((isset($_GET['profile']) && $_GET['profile'] == true) || (isset($_COOKIE['profile']) && $_COOKIE['profile'] == true)) {
                    $enabled = true;
                }
            }

            // Process filters
            if ($enabled && $conf->enableFilters) {

                // sampling filter
                if ($enabled && rand(0,100000) > $conf->filters->sampling * 1000) {
                    $enabled = false;
                }

                // request uri whitelist/blacklist
                $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; // TODO: use script name instead for cli?
                if ($enabled && $conf->filters->requestUriWhiteList && !preg_match($conf->filters->requestUriWhiteList, $requestUri)) {
                    $enabled = false;
                }
                if ($enabled && $conf->filters->requestUriBlackList && preg_match($conf->filters->requestUriBlackList, $requestUri)) {
                    $enabled = false;
                }

                // note: timeThreshold and memoryThreshold will be checked before persisting records. In these cases data will still be recorded during the request
            }

            if ($enabled) {
                self::enable();
            }
        }
        return self::$_enabled;
    }
431624
public function enabled() : bool
    {
        if ($this->isEnabled !== null) {
            return $this->isEnabled;
        }

        if (!$this->config->get("antispam.{$this->instanceType}.enabled", true)) {
            return $this->isEnabled = false;
        }

        $disabledEnv = (array) $this->config->get("antispam.{$this->instanceType}.disabled_env", []);

        if (in_array($this->config->get('app.env', 'production'), $disabledEnv)) {
            return $this->isEnabled = false;
        }

        if ($this->instanceType === 'recaptcha') {
            if ($this->config->get('antispam.recaptcha.guests_only', false) && $this->request->user() !== null) {
                return $this->isEnabled = false;
            }
        }

        return $this->isEnabled = true;
    }
224825
public function allowRequest()
    {
        if ($this->config->get('circuitBreaker')->get('forceOpen')) {
            return false;
        }
        if ($this->config->get('circuitBreaker')->get('forceClosed')) {
            return true;
        }

        return !$this->isOpen() || $this->allowSingleTest();
    }
716741
protected function canAccess()
    {
        if ($this->formRequest->user()->isAdmin() || $this->formRequest->user()->isUser()) {
            return true;
        }

        return $this->formRequest->user()->canDo('message.message.view');
    }
137340
public function checkBE()
	{
	    if ($this->isContao45()) 
	    {
	        if ($this->_BackendUser)
	        {
                ModuleVisitorLog::writeLog( __METHOD__ , __LINE__ , ': True' );
                return true;
	        }
	        ModuleVisitorLog::writeLog( __METHOD__ , __LINE__ , ': False' );
	        return false;
	    }
		//Contao <4.5.0
	    $strCookie = 'BE_USER_AUTH';
		$hash = sha1(session_id() . (!\Config::get('privacyAnonymizeIp') ? \Environment::get('ip') : '') . $strCookie);
		if (\Input::cookie($strCookie) == $hash)
		{
			// Try to find the session
			$objSession = \SessionModel::findByHashAndName($hash, $strCookie);
			// Validate the session ID and timeout
			if ($objSession !== null && $objSession->sessionID == session_id() && (\Config::get('privacyAnonymizeIp') || $objSession->ip == \Environment::get('ip')) && ($objSession->tstamp + $GLOBALS['TL_CONFIG']['sessionTimeout']) > time())
			{
			    ModuleVisitorLog::writeLog( __METHOD__ , __LINE__ , ': True' );
				return true;
			}
		}
		ModuleVisitorLog::writeLog( __METHOD__ , __LINE__ , ': False' );
		return false;
	}
831521
public function AllowDisplayInShop()
    {
        $bShowCat = false;

        $oShop = TdbShop::GetInstance();
        if (!is_null($oShop) && !$oShop->fieldShowEmptyCategories) {
            $bShowCat = ($this->GetNumberOfArticlesInCategory(true) > 0);
        } else {
            $bShowCat = true;
        }

        if (false == $this->fieldActive || false == $this->fieldTreeActive) {
            $bShowCat = false;
        }

        $targetPage = $this->getTargetPage();
        if (null === $targetPage || false === $targetPage) {
            return true;
        }
        // show only if the user has access to the category target page
        if (false === $targetPage->AllowAccessByCurrentUser()) {
            return false;
        }

        return $bShowCat;
    }
1137749
public function isLoggedIn()
    {
        if (!$this->hasFakeFrontEnd()) {
            throw new Exception('Please create a front end before calling isLoggedIn.', 1334439494);
        }

        return isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])
            && is_array($GLOBALS['TSFE']->fe_user->user);
    }
1160452
public function canView($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }

        // extended access checks
        $results = $this->extend('canView', $member);
        if ($results && is_array($results)) {
            if (!min($results)) {
                return false;
            }
        }

        // user needs access to CMS_ACCESS_SecurityAdmin
        if (Permission::checkMember($member, "CMS_ACCESS_SecurityAdmin")) {
            return true;
        }

        return false;
    }
1152935
private function checkInputs()
    {
        if (!$this->disableInputCheck && !($this->requestId && $this->connectId)) {
            throw new EndpointException("No request ID or connect ID were provided");
        }
        
        $requestId = $this->getParam("request_id");
        $connectId = $this->getParam("connect_id");
        $code = $this->getParam("code");
        $signature = $this->getParam("signature");
        $status = $this->getParam("result");
        
        if (!$this->disableInputCheck) {
          if ($this->requestId != $requestId) {
              throw new EndpointException("Invalid request ID");
          }

          if ($this->connectId != $connectId) {
              throw new EndpointException("Invalid connect ID");
          }
        }
        
        if ($status == self::STATUS_AUTHORIZED) {
          if (!$code) {
            throw new EndpointException("No auth code");
          }
        }
        
        $this->checkSignature(base64_decode($signature, true), $status, $code);
        
        return ($status == self::STATUS_AUTHORIZED);
    }
1067207
public function checklogin()
    {
        $myUtilsServer = \OxidEsales\Eshop\Core\Registry::getUtilsServer();
        $myUtilsView = \OxidEsales\Eshop\Core\Registry::getUtilsView();

        $sUser = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('user', true);
        $sPass = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('pwd', true);
        $sProfile = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('profile');

        try { // trying to login
            /** @var \OxidEsales\Eshop\Application\Model\User $oUser */
            $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
            $oUser->login($sUser, $sPass);

            if ($oUser->oxuser__oxrights->value === 'user') {
                throw oxNew(UserException::class, 'ERROR_MESSAGE_USER_NOVALIDLOGIN');
            }

            $iSubshop = (int) $oUser->oxuser__oxrights->value;
            if ($iSubshop) {
                \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("shp", $iSubshop);
                \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('currentadminshop', $iSubshop);
                \OxidEsales\Eshop\Core\Registry::getConfig()->setShopId($iSubshop);
            }
        } catch (UserException $oEx) {
            $myUtilsView->addErrorToDisplay('LOGIN_ERROR');
            $oStr = getStr();
            $this->addTplParam('user', $oStr->htmlspecialchars($sUser));
            $this->addTplParam('pwd', $oStr->htmlspecialchars($sPass));
            $this->addTplParam('profile', $oStr->htmlspecialchars($sProfile));

            return;
        } catch (\OxidEsales\Eshop\Core\Exception\CookieException $oEx) {
            $myUtilsView->addErrorToDisplay('LOGIN_NO_COOKIE_SUPPORT');
            $oStr = getStr();
            $this->addTplParam('user', $oStr->htmlspecialchars($sUser));
            $this->addTplParam('pwd', $oStr->htmlspecialchars($sPass));
            $this->addTplParam('profile', $oStr->htmlspecialchars($sProfile));

            return;
        } catch (\OxidEsales\Eshop\Core\Exception\ConnectionException $oEx) {
            $myUtilsView->addErrorToDisplay($oEx);
        }

        //execute onAdminLogin() event
        $oEvenHandler = oxNew(\OxidEsales\Eshop\Core\SystemEventHandler::class);
        $oEvenHandler->onAdminLogin(\OxidEsales\Eshop\Core\Registry::getConfig()->getShopId());

        // #533
        if (isset($sProfile)) {
            $aProfiles = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("aAdminProfiles");
            if ($aProfiles && isset($aProfiles[$sProfile])) {
                // setting cookie to store last locally used profile
                $myUtilsServer->setOxCookie("oxidadminprofile", $sProfile . "@" . implode("@", $aProfiles[$sProfile]), time() + 31536000, "/");
                \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("profile", $aProfiles[$sProfile]);
            }
        } else {
            //deleting cookie info, as setting profile to default
            $myUtilsServer->setOxCookie("oxidadminprofile", "", time() - 3600, "/");
        }

        // languages
        $iLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("chlanguage");
        $aLanguages = \OxidEsales\Eshop\Core\Registry::getLang()->getAdminTplLanguageArray();
        if (!isset($aLanguages[$iLang])) {
            $iLang = key($aLanguages);
        }

        $myUtilsServer->setOxCookie("oxidadminlanguage", $aLanguages[$iLang]->abbr, time() + 31536000, "/");

        //P
        //\OxidEsales\Eshop\Core\Registry::getSession()->setVariable( "blAdminTemplateLanguage", $iLang );
        \OxidEsales\Eshop\Core\Registry::getLang()->setTplLanguage($iLang);

        return "admin_start";
    }
225450
public function isDisabled()
    {
        // Disable (if no enabled buttons):
        
        if (!$this->getEnabledButtons()->exists()) {
            return true;
        }
        
        // Disable (if no current page):
        
        if (!($page = $this->getCurrentPage(Page::class))) {
            return true;
        }
        
        // Disable (if disabled for page class):
        
        if (in_array(get_class($page), $this->config()->disabled_on)) {
            return true;
        }
        
        // Enable (if sharing is not disabled for page):
        
        return !$page->isSharingDisabled() ? parent::isDisabled() : true;
    }
145656
private boolean isAlwaysShow(Component comp) {

        return ((comp == m_appIndicator)
            || (comp == m_contextMenu)
            || (comp == m_userDropDown)
            || (comp == m_quickLaunchDropDown)
            || comp.getStyleName().contains(OpenCmsTheme.REQUIRED_BUTTON));
    }
313585
public function canBrowse()
    {
        $viewer = get_viewer();

        if ($viewer->admin() || $viewer->eql($this->actor)) {
            return true;
        }

        return false;
    }