Render manual renewal banner
What does this MR do and why?
Part of https://gitlab.com/gitlab-org/gitlab/-/issues/346259
This change will use the logic that was introduced in !75872 (merged) to render the manual renewal banner.
The banner will only be displayed for customers with a self-managed cloud license but have restricted internet access that prevents them from renewing their license automatically and have to take manual action. This condition is still under discussion though and therefore not added yet. Since the feature is behind a feature flag, the missing condition can be added at a later time.
Furthermore, there should be no future license in the system. The current license is either expired or expiring within the next 14 days (notification window) in order to show up.
To see the banner, the customer has to be logged in as an admin and can see the banner on the admin dashboard (/admin
) and the subscription page (/admin/subscription
).
Please see the issue for more information.
Screenshots or screen recordings
How to set up and validate locally
In your CustomersDot instance:
- Log into the admin area.
- Go to
/admin/license/new
. - Create a license that has expired a few days ago and keep the license key ready.
- Go to
/admin/license/new
again. - Create a license that will expire in the 14 days (within notification window) and keep the license key ready.
- Go to
/admin/license/new
again. - Create a license that will expire in the 25 days (outside of notification window) and keep the license key ready.
- Go to
/admin/license/new
again. - Create a license that will start in the future and keep the license key ready.
In your GitLab instance:
- Go into the rails console.
- Delete all uploaded licenses (
License.destroy_all
) - Enable the feature flag:
Feature.enable(:automated_email_provision)
. - Visit your GitLab instance in the browser.
- Log into the admin area and make sure you are on
/admin
. - Upload the previously created expired license.
- See the banner with the expired wording on
/admin
and on/admin/license
. - Upload the future-dated license.
- Do not see the banner anymore.
- Delete both licenses again.
- Upload the previously created expiring license (within notification window).
- See the banner with the expiring wording on
/admin
and on/admin/license
. - Upload the previously created expiring license (outside of notification window).
- Do not see the banner.
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.