Check for subscription pre-approval support.

@return true if subscription pre-approval is supported by the server.
@throws NotLoggedInException if not logged in.
@since 4.2
975026
public boolean isSubscriptionPreApprovalSupported() throws NotLoggedInException {
        final XMPPConnection connection = getAuthenticatedConnectionOrThrow();
        return connection.hasFeature(SubscriptionPreApproval.ELEMENT, SubscriptionPreApproval.NAMESPACE);
    }
259424
public boolean isSupported() throws NoResponseException, NotConnectedException,
                    InterruptedException, XMPPErrorException {
        // This is just a primitive hack, since XEP-49 does not specify a way to determine if the
        // service supports it
        try {
            setPrivateData(DUMMY_PRIVATE_DATA);
            return true;
        }
        catch (XMPPErrorException e) {
            if (e.getStanzaError().getCondition() == Condition.service_unavailable) {
                return false;
            }
            else {
                throw e;
            }
        }
    }
1282761
public boolean isCurrentUserAdmin() throws RepositoryException {
    	boolean isAdmin = false;
        final JackrabbitSession session = (JackrabbitSession) getSession();
        final UserManager userManager = session.getUserManager();
        Authorizable a = userManager.getAuthorizable(getRequest().getUserPrincipal());
        if (a instanceof org.apache.jackrabbit.api.security.user.User) {
        	isAdmin = ((org.apache.jackrabbit.api.security.user.User)a).isAdmin();
        }
        return isAdmin;
    }
515740
public function isGuestAllowed()
    {
        if (null === $user = $this['repo.users']->findByLogin(User::USER_GUEST)) {
            return false;
        }

        return count($this->getAclForUser($user)->get_granted_base()) > 0;
    }
170074
public function isSubmittable() {

		return $this->isRegistration() || $this->status == IApproval::STATUS_REJECTED ||
			$this->status == IApproval::STATUS_FROJEN || $this->status == IApproval::STATUS_BLOCKED;
	}
427250
private function checkCapabilities(ClientInterface $client)
    {
        if ($client->getConnection() instanceof AggregateConnectionInterface) {
            throw new NotSupportedException(
                'Cannot initialize a PUB/SUB consumer over aggregate connections.'
            );
        }

        $commands = array('publish', 'subscribe', 'unsubscribe', 'psubscribe', 'punsubscribe');

        if ($client->getProfile()->supportsCommands($commands) === false) {
            throw new NotSupportedException(
                'The current profile does not support PUB/SUB related commands.'
            );
        }
    }
630088
public function isLoggedIn()
    {
        $response = $this->client->get($this->uri());

        try {
            $body = $this->handleResponse($response)->getDecodedData();
        } catch (ClientException $exception) {
            return false;
        }

        return property_exists(
            $body,
            'user'
        );
    }
997335
public boolean containsGuesses()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "containsGuesses");
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "containsGuesses", Boolean.FALSE);
    return false;
  }
798358
@Override
	public boolean shouldUseLtpaIfJwtAbsent() {
		// TODO Auto-generated method stub
		JwtSsoBuilderConfig jwtssobuilderConfig = getJwtSSOBuilderConfig();
		if (jwtssobuilderConfig != null) {
			return jwtssobuilderConfig.isUseLtpaIfJwtAbsent();
		}
		return true;
	}
954234
protected void checkLoginRequired(ActionRuntime runtime) throws LoginRequiredException {
        loginManager.ifPresent(nager -> {
            nager.checkLoginRequired(createLogingHandlingResource(runtime));
        });
    }
16345
public function canLogin()
    {
        $subscriber_id = AnRequest::get('session.subscriber_id', 'cmd');

        if ($subscriber_id) {
            $this->person = $this->getService('repos:people.person')->find($subscriber_id);
        }

        return !is_null($this->person);
    }
228193
public static boolean loginAtStart() {
		boolean loginAtStart = Application.getInstance().isLoginRequired() || Configuration.get("MjLoginAtStart", "false").equals("true");
		if (loginAtStart && !Backend.getInstance().isAuthenticationActive()) {
			throw new IllegalStateException("Login required but authorization is not configured!");
		}
		return loginAtStart;
	}
413744
public static boolean isSupported() {
        return Navigator.webkitGetUserMedia != null
                || Navigator.getUserMedia != null
                || Navigator.mozGetUserMedia != null
                || Navigator.msGetUserMedia != null;
    }
1172874
public function __isAllowed()
    {
        if ($this->checkAuthentication !== true) {
            // this controller is not responsible for the authentication
            return false;
        }

        $this->typo3Loader->initializeFrontEndUser($this->determinePageIdFromArguments());

        $feUser = $this->typo3Loader->getFrontEndUser();
        if ($feUser->user === null) {
            return false;
        }
        return true;
    }
224978
public boolean isRegistered( String clientID , String subscriptionName )
	{
		String key = clientID+"-"+subscriptionName;
		return subscriptions.containsKey(key);
	}
84072
protected boolean isUserRequest()
   {
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "isUserRequest");
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "isUserRequest", ""+isUserRequest);
      return isUserRequest;
   }
199454
public boolean isSatisfiedBy(Semver version) {
        if (this.range != null) {
            // We are on a leaf
            return this.range.isSatisfiedBy(version);
        } else {
            // We have several sub-requirements
            switch (this.op) {
                case AND:
                    try {
                        List<Range> set = getAllRanges(this, new ArrayList<Range>());
                        for (Range range : set) {
                            if (!range.isSatisfiedBy(version)) {
                                return false;
                            }
                        }
                        if (version.getSuffixTokens().length > 0) {
                            // Find the set of versions that are allowed to have prereleases
                            // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
                            // That should allow `1.2.3-pr.2` to pass.
                            // However, `1.2.4-alpha.notready` should NOT be allowed,
                            // even though it's within the range set by the comparators.
                            for (Range range : set) {
                                if (range.version == null) {
                                    continue;
                                }
                                if (range.version.getSuffixTokens().length>0) {
                                    Semver allowed = range.version;
                                    if (Objects.equals(version.getMajor(), allowed.getMajor()) &&
                                            Objects.equals(version.getMinor(), allowed.getMinor()) &&
                                            Objects.equals(version.getPatch(), allowed.getPatch())) {
                                        return true;
                                    }
                                }
                            }
                            // Version has a -pre, but it's not one of the ones we like.
                            return false;
                        }
                        return true;
                    } catch (Exception e) {
                        // Could be that we have a OR in AND - fallback to default test
                        return this.req1.isSatisfiedBy(version) && this.req2.isSatisfiedBy(version);
                    }
                case OR:
                    return this.req1.isSatisfiedBy(version) || this.req2.isSatisfiedBy(version);
            }
            throw new RuntimeException("Code error. Unknown RequirementOperator: " + this.op); // Should never happen
        }
    }