code: function userDomainIsPermitted(userDomains, permittedDomains) {
    var isPermitted = false;
  
    _.each(permittedDomains, function(permittedDomain) {
      _.each(userDomains, function(userDomain) {
        if(userDomain.toUpperCase() === permittedDomain.toUpperCase()) {
          isPermitted = true;
        }
      });
    });
  
    return isPermitted;
  }
docs: Check that the users domain is present in list of permitted domains //