It should be possible to disable `Allow user sign-up` but still invite users by email address
Summary
With #356965 we changed the behavior that users can not be invited by email when the instance is set to Disable new sign ups in GitLab 16.6.
This means that users that try to invite other users to groups or projects can only do so by using the username and not the email address.
It would be good to still be able to invite via the email address even if new sign-ups are not allowed.
Steps to reproduce
- follow the steps in Disable new sign ups to disallow new sign-ups
- log in as a user and attempt to invite a user by email address to any namesapce
Example Project
What is the current bug behavior?
It is not possible to invite users by email.
What is the expected correct behavior?
It should be possible (or at least configurable) to invite users via email address.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)