Skip to content

Display temporary extension expiration banner

Aishwarya Subramanian requested to merge display-temporary-extension-banner into master

What does this MR do and why?

This MR adds the following changes:

  • adds a banner when a temporary extension license is about to expire (7 days before expiration date) OR has already expired (see screenshot below)
  • updates the gitlab-license gem version to 2.5. The License#temporary_extension? method was added in this version (see MR)

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.

Expiring soon Already expired
Screenshot_2024-06-06_at_2.52.06_PM Screenshot_2024-06-06_at_3.18.51_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Pre-requisites:

Step 1: In CustomersDot application:

  1. Create a SM subscription that has already expired. Note subscription ID
  2. Create a admin user with email sfdcadmins@gitlab.com. Note the token.
  3. Invoke the GraphQL mutation:
curl "http://localhost:5000/graphql" \
       -X POST \
  -d "{\"query\": \"mutation {createTemporaryExtension(input: {numberOfDays: 2, glEmail: \\\"test@gitlab.com\\\", zuoraSubscriptionId: \\\"<replace_with_subscripion_id>\\\", usersCount: 40, reason: \\\"Customer's payment process delay\\\", salesforceOpportunityId: \\\"006Ek000004Uiz7IAC\\\", notes: \\\"example note\\\"}) { errors } } \"}" \
  -H "X-Admin-Email: sfdcadmins@gitlab.com" \
  -H "X-Admin-Token: <replace_with_token>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
  1. Navigate to http://localhost:5000/letter_opener and note down the temporary extension license key.

Step 2: Sign in as root user in gdk and head over to Admin dashboard.

Apply the temporary extension license key.

Notice the expiring soon banner shows up.

Edited by Aishwarya Subramanian

Merge request reports