Allow or block sign-up from a certain domains for self hosted installations

On a self hosted installation, it’d be helpful if we could allow or block sign-up from certain domains. In an enterprise, for example, the administrators might need to restrict signup only from the users work email or allow part-time contractors to sign-up.

Gitlab-CE has a similar feature where you can provide a list of either white-listed OR blacklisted domains. The administrator can choose to upload a file with the list of domains or key them in manually.