Skip to content

batches: Add changeset license gate for free license

Warren Gifford requested to merge rc/changeset-gate into main

Created by: Piszmog

Closes #37834 (closed)

Created a custom component (LicenseAlert) that calls GetLicenseAndUsageInfo Query to get back whether the license has batch changes or campaigns feature. If no, then the alert is show. Component has a property additionalCondition which allows the alert to be show for an additional condition (for example, more than 5 changesets). The other property the component can take (onLicenseRetrieved) can help a parent component get license context to drive additional rendering (for example, disabling the Apply button).

Just in case a user can bypass these UI checks, checkLicense is called in applyOrCreateBatchChange to prevent a batch change from being applied with more than 5 changeset when the license does not support that.

Test plan

Added stories and Go Unit Tests.

Stories

Additional Screenshots

Changesets + Imports

Screen Shot 2022-07-20 at 09 03 48 Screen Shot 2022-07-20 at 09 03 58

Merge request reports

Loading