Allow only whitelisted domains to self-register, but allow manual invitation of any email address

Is it possible to simultaneously:

  1. Allow only users with a whitelisted email domain to self-register.
  2. Allow staff to manually invite any email address (not necessarily whitelisted).

I know (1) is possible through the email domains whitelist option, but enabling this prevents (2).

If you want a tight control over authentication you can implement it in a different app and use SSO.