Update license compliance widget extension computed props
What does this MR do and why?
It aligns the frontend fields with the backend fields has_denied_licenses
!90841 (merged) and approval_required
!87150 (merged)
Changes
-
approval_required
is the key we used in frontend already so it needs no change -
denied_license
was changed tohas_denied_licenses
. It also went from an integer to a boolean.
Describe in detail what your merge request does and why.
Screenshots or screen recordings
Denied Licenses
Denied License and approval required
Screenshot TBD. Unit tests and UI supports this state, but the endpoint is not currently returning the correct status. Assuming that it does, this MR should be fine.
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
-
Reach out to me for a demo, or attempt steps below -
In a rails console enable flag Feature.enable(:refactor_license_compliance_extension)
-
Clone the https://gitlab.com/gitlab-examples/security/security-reports project locally -
Manually trigger the pipeline to run for Master
. This can be done by going to theCI/CD
->Pipelines
tab on the left nav and then clicking theRun Pipeline
button. -
Create a new MR. I suggest changing something simple like a letter or two in the README.md
file. We just need a pipeline to complete and run. The sample project uses test reports to generate the data so doesn't matter what you change just need a MR. -
Set up Allowed/Denied licenses in https://<localhost>/<group>/<project>/-/licenses#policies
-
Add a License-Check
approval group with at least 4 required approvals -
Create a new MR -
See License compliance widget
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #366930 (closed)