batches: Add changeset license gate for free license
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.