License Management MR widget looks at the forks licenses
- Given you have a Project A
- And you have a fork of the Project: B
- If you create a MR from B to A, the license MR widget will use the license management API of the fork.
This video demonstrates the bug:
The fix is rather simple, as we just have to change this line:
- api_v4_projects_managed_licenses_path(id: merge_request.source_project.id)
+ api_v4_projects_managed_licenses_path(id: merge_request.target_project.id)
and write some regression test for it!
The following discussion from !7411 (merged) should be addressed:
-
@nick.thomas started a discussion: (+2 comments) Are we sure the source project is correct? Don't merge requests normally take the settings of the target project as canonical?
How does this behave at present in the forked-project case, where I'm looking to add something licensed under, say,
WTFPL
, with an MR fromnick.thomas/gitlab-ce
togitlab-org/gitlab-ce
?As the submitter of the merge request, can I make
WTFPL
an approved license fornick.thomas/gitlab-ce
, then submit the MR, and so hide the license (which would violategitlab-org/gitlab-ce
requirements) from the acceptor?