Add an admin page for viewing and managing licenses.
Review Request #14404 — Created April 28, 2025 and updated
This adds a new dedicated Licenses page in the Admin UI for seeing all
current registered licenses across License Providers. These indicate the
state of the licenses, expiration information, provide license
management, actions, and custom line items.Each license is represented by a
License
model andLicenseView
view,
backed by state provided by the License Provider. Custom models, views,
and data can be provided as needed.Some basic infrastructure is set up for custom actions and license
checks. To ease review, those capabilities will be introduced in a
follow-up change.
Python and JavaScript unit tests passed.
Tested this with some custom License Providers registered in extensions
as tests, and with Power Pack ported over to License Providers. Verified
that all the state and status updates introduced in this change function
as expected.
Summary | ID |
---|---|
94a6067c0c98c25dd29cdc1e12649c75ab56826b |
Description | From | Last Updated |
---|---|---|
'json' imported but unused Column: 1 Error code: F401 |
![]() |
|
'uuid.uuid4' imported but unused Column: 1 Error code: F401 |
![]() |
|
'reviewboard.licensing.errors.LicenseActionError' imported but unused Column: 1 Error code: F401 |
![]() |
|
'reviewboard.licensing.license_checks.ProcessCheckLicenseResult' imported but unused Column: 1 Error code: F401 |
![]() |
|
'reviewboard.licensing.license_checks.ProcessCheckLicenseResultStatus' imported but unused Column: 1 Error code: F401 |
![]() |
|
'djblets.util.typing.JSONValue' imported but unused Column: 5 Error code: F401 |
![]() |
|
'djblets.util.typing.SerializableJSONValue' imported but unused Column: 5 Error code: F401 |
![]() |
|
Why are we doing it this way instead of include('reviewboard.licensing.urls')? Seems like we should stay consistent. |
|
|
Should we define a TypedDict for this return type so we get warnings about if anything we're assigning isn't the … |
|
|
Switch these two import lines |
|
|
These should come from collections.abc, not typing |
|
|
Can we either mark this as internal (prefix with _) or add docstrings to it? Future docstring linting will complain … |
|
|
Same here. |
|
|
And here. |
|
|
Can we add doc comments on these? |
|
|
Please add a docstring. |
|
|
Please add a docstring. |
|
|
Please add a docstring. |
|
|
Please add a docstring. |
|
|
tuple -> dict |
|
|
This should fit on one line. |
|
- Change Summary:
-
Removed unused imports intended for the follow-up change.
- Commits:
-
Summary ID dbc60a990cb29fad5e214c98abaa8b6977c7c0bf 94a6067c0c98c25dd29cdc1e12649c75ab56826b - Diff:
-
Revision 2 (+4154 -16)
Checks run (2 succeeded)
-
-
Why are we doing it this way instead of
include('reviewboard.licensing.urls')
? Seems like we should stay consistent. -
Should we define a
TypedDict
for this return type so we get warnings about if anything we're assigning isn't the right type? -
-
-
Can we either mark this as internal (prefix with
_
) or add docstrings to it? Future docstring linting will complain otherwise. -
-
-
-
-
-
-
-
-