No BSO e-mail if current user is Owner
What does this MR do and why?
Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/441796 and expands the functionality introduced with !146302 (merged). When the Owner is the one adding members (i.e., the current user), we skip sending the e-mail.
Note that this is a feature under development, behind a feature flag.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Example below:
-
In rails console enable the FF
Feature.enable(:block_seats_overages)
-
Visit any group or project with N seats in subscription
-
Make sure your logged in user has
Owner
role -
Make sure that all seats are occupied
-
Try to add another members
-
Check
http://127.0.0.1:3000/rails/letter_opener
– there should be no email
Alternatively, the template is available at http://localhost:3000/rails/mailers/notify/no_more_seats
-->