code: @Override
  	public boolean isUserValid(String userId, AuthType authType) {
  		if (userInfoRepository.findByUsernameAndAuthType(userId, authType) != null) {
  			return true;
  		} else {
  			if (authType == AuthType.LDAP) {
  				try {
  					return searchLdapUser(userId);
  				} catch (NamingException ne) {
  					LOGGER.error("Failed to query ldap for " + userId, ne);
  					return false;
  				}
  			} else {
  				return false;
  			}
  		}
  	}
docs: Can be called to check validity of userId when creating a dashboard remotely via api
  @param userId
  @param authType
  @return