• 
      

    Complete the support for custom license actions.

    Review Request #14509 — Created July 16, 2025 and submitted — Latest diff uploaded

    Information

    Review Board
    release-7.1.x

    Reviewers

    Actions are no longer hard-coded client-side, and custom actions no
    longer require subclassing RB.LicenseView.

    A registered action can now provide extra_data, which can be handled
    specially by a RB.LicenseView subclass, and call_args, which will be
    included in an action call back to the License Provider when clicked.

    License action handlers can provide new license action updates, just
    like a Check Update request, by returning license_infos in the
    response. It can also redirect to a URL by providing redirect_urls.

    This makes it possible for an action to begin a more involved
    license-related flow kicked off by the License Provider and going
    through other servers or URLs.

    Since actions are more dynamic now, we no longer hard-code the Manage
    License and Upload License actions within RB.LicenseView. Instead,
    BaseLicenseProvider.get_license_actions() now registers these by
    default, and subclasses can override them or reposition them.

    Since the Upload License action is special, RB.LicenseView still needs
    to handle it specially. This is now done through
    RB.LicenseView.actionBuilders, which is a mapping of action IDs to
    custom builder functions. The Upload License handler is registered in
    this mapping.

    Unit tests pass.

    Registered some custom actions and verified that clicking them triggered
    a call handled the License Provider. Also verified that the license_infos
    and redirect_url results worked.

    Commits

    Files