Add the beginnings of common license representation for extensions.
Review Request #14242 — Created Nov. 12, 2024 and updated — Latest diff uploaded
Review Board has optional support for a licensed product, Power Pack,
which provides a number of additional features including Document
Review. Power Pack currently provides its own management UI and
expiration warning banners for its license and trial states.By having this live exclusively in Power Pack, it's difficult to always
seamlessly represent state in our UI, particularly as our UI changes,
since Power Pack supports a wide range of Review Board versions. It also
requires any other extensions to provide all their own UI, making it
challenging if we wanted to introduce licenses for anything else.This change introduces the first steps in centralizing some of this.
Extensions are still responsible for their own licensing mechanisms, but
now they can provide a representation of their licensed state via new
BaseLicenseProvider
andLicenseInfo
classes.
BaseLicenseProvider
can be subclassed and implemented by extensions to
provide lookup for license information, state for license checks, and
actions that users can perform.
LicenseInfo
represents common information on an active, expired, or
trial license, for the purposes of display and management in the UI.None of this is responsible for license enforcement. It's purely an
informational source, and will be used to better help licensed customers
see their license states in the Admin UI and to keep track of
expiring/expired licenses or trial states.Upcoming changes will introduce UI for viewing and managing licenses, as
needed by licensed extensions.For now, license management is gated by an Experimental feature flag,
but this will be enabled fully in 7.1.
Tested this with the beginnings of the UI work and the License Provider
implementation for Power Pack 6. There isn't much actual logic in this
change to test or execute at this time.