code: function (set1, set2) {
  				
  		if (set1 instanceof Array === false ||
  			set2 instanceof Array === false)
  			return false;
  		
  		// return true if at least one match is found
  		for (var i=0; i < set1.length; i++) {
  			for (var j=0; j < set2.length; j++) {
  				if (set1[i] === set2[j]) {
                      //console.log("matched group/permission: " + set1[i]);
  					return true;
                  }
              }
          }
  		return false;
  	}
docs: TODO: move to some other user management place? check if groups match, return true if any from set1 matches any from set2