code: function wildCardMatch(text, pattern){
  	var cards = pattern.split("*");
  	if (!pattern.startsWith("*") && !text.startsWith(cards[0])) { //$NON-NLS-1$
  		return false;
  	}
  	if (!pattern.endsWith("*") && !text.endsWith(cards[cards.length - 1])) { //$NON-NLS-1$
  		return false;
  	}
  	return !cards.some(function(card){
  		var idx = text.indexOf(card);
  		if (idx === -1){
  			return true;
  		}
  		text = text.substring(idx + card.length);
  	});
  }
docs: Utility function to check if the request matches a given pattern of access
  @param {string} text The text to check
  @param {string} pattern The access pattern
  @returns {bool} If the text matches the given access pattern