@Override
    public boolean isValid() {
        try {
            // Verify whether or not time restrictions still apply.
            RestrictionVerificationService.verifyTimeRestrictions(this, effectiveUserGroups);
            return true;
        }
        catch (GuacamoleException e) {
            LOGGER.debug("User account is now restricted and is no longer valid", e);
            return false;
        }
    }
Creates a new RestrictedUserContext which wraps the given UserContext,
providing additional control for user logins and connections.

@param userContext
    The UserContext to wrap.

@param remoteAddress
    The address the user is logging in from, if known.

@param effectiveUserGroups
    The identifiers of the groups this user is associated with.
extensions/guacamole-auth-restrict/src/main/java/org/apache/guacamole/auth/restrict/user/RestrictedUserContext.java