• 
      

    Add support for custom license action handling.

    Review Request #14614 — Created Sept. 15, 2025 and discarded

    Information

    Review Board
    release-7.1.x

    Reviewers

    License Providers that register custom actions can now handle them in
    requests from the client. This is done by registering the action name in
    the License Provider's custom_actions set and then adding a
    handle_<actionid>_action() method to handle the response.

    BaseLicenseProvider.call_action() has been added to invoke these
    actions. This does the work formerly done by the view, making it more
    generally-useful outside of HTTP handling. This takes the action ID,
    action request data, the license information to operate off of, and an
    optional HTTP request (which may be needed by some actions).

    The action data may be any arbitrary JSON-safe data. Previously, when
    the view handled an action, it expected keys and values in the HTTP POST
    data to be used as arguments, but now it requires an explicit
    action_data JSON field, which can then be deserialized and passed to
    action handlers.

    The built-in actions (license-update-check, process-license-update,
    and upload-license) now live on BaseLicenseProvider instead of the
    view, giving call_action() access to them.

    Unit tests pass.

    Made use of this in Power Pack's license integration.

    Summary ID
    Add support for custom license action handling.
    License Providers that register custom actions can now handle them in requests from the client. This is done by registering the action name in the License Provider's `custom_actions` set and then adding a `handle_<actionid>_action()` method to handle the response. `BaseLicenseProvider.call_action()` has been added to invoke these actions. This does the work formerly done by the view, making it more generally-useful outside of HTTP handling. This takes the action ID, action request data, the license information to operate off of, and an optional HTTP request (which may be needed by some actions). The action data may be any arbitrary JSON-safe data. Previously, when the view handled an action, it expected keys and values in the HTTP POST data to be used as arguments, but now it requires an explicit `action_data` JSON field, which can then be deserialized and passed to action handlers. The built-in actions (`license-update-check`, `process-license-update`, and `upload-license`) now live on `BaseLicenseProvider` instead of the view, giving `call_action()` access to them.
    dd7d1fcf388f77c1d34ace78ce922b9686045f35
    chipx86
    1. 
        
    2. This apparently did not get posted for review before. Newer changes depend on it.

    3. 
        
    chipx86
    Review request changed
    Status:
    Discarded