Add overage detection to the over free user cap alerting by email
What does this MR do and why?
Add the 'did the member add cause the namespace to go over' logic to the over free user cap alerting email.
We implemented the basic concept in !135268 (merged) and left the overage logic for this MR.
See case described in #415487
Screenshots or screen recordings
no change from recent implementation
How to set up and validate locally
- Setup initial application settings in
bundle exec rails c
ApplicationSetting.first.update(dashboard_limit_enabled: true, dashboard_limit: 5) Feature.enable(:free_user_cap_over_limit_email)
- Simulate Saas and restart GDK
- Create a new top-level private group(A).
- Create a public(for ease of example so limit isn't applied) new top-level group(B).
- Go to the first top-level private group's member page and invite group B.
- Confirm on page reload no free user cap alerts exist(yet) and members are under 5.
- Go to the members page of group B and invite 6 users by username.
- Go to the members page of group A and confirm over limit alert message appears(not added by this MR).
- Go to http://gdk.test:3000/rails/letter_opener/ and verify email is seen.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #415487
Edited by Doug Stull