Skip to content

Manually add entries in the License Management settings

Description

In https://gitlab.com/gitlab-org/gitlab-ee/issues/5488 we created a settings page to handle license management entries. The list is populated when users add entries from the License Management report, and can be changed or deleted. But there is no way to add a new license in the list manually from the settings page.

A common use case is the following: I already know which are my licenses (approved, blacklisted) when I start my project. I want to enforce it from the beginning, so any developer working on it already knows if there is a conflict or not, without dealing with the "unapproved" licenses). With the current flow, we need to wait until a license appears in the report before we can "action" it. It would be useful to allow a manual add of the license even before it has been found.

Proposal

Add licenses directly in the settings page. Once added, they are exactly the same as any other entry in the page.

We can use a dropdown that also allows arbitrary input. The dropdown is preloaded with a list of known licenses.
This allows the following use cases:

  1. users open the dropdown and select an existing license from the list
  2. users start to type and the dropdown list is filtered to show only matching entries
  3. users type a license that is not in the preloaded list, and use it as a "custom" entry

The source of the preloaded license list is available at https://github.com/spdx/license-list-data/blob/master/json/licenses.json.

Design

Initial state
Project-settings--expanded--licenses--existing--licnese
Adding a license: Project settings, expanded License Management, no licenses added
clicking "Add license will show this area where a user can manually add a license by: clicking on the field and either (1. begin typing the license name and selecting it from the drop-down or 2. scrolling until the desired license is found.)
Global change: removed label above radio button list
final-version-project-settings--expanded--existing-licenses--adding-a-license-form-list
Drop-down
6-project-settings--expanded--licenses--dropdown
License selected
final-version-project-settings--expanded--no-licenses--adding-a-license
License approved
final-version-project-settings--expanded--no-licenses--adding-a-license-approved
License added
Project-settings--expanded--licenses--submitted
License already exists: error
final-version-project-settings--expanded--no-licenses--adding-a-license-error

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖