Add correct anchor link to new policy tab
Problem to solve
#14061 (closed) migrated the license compliance section from project > settings > ci/cd > license compliance
to project > security > license compliance > polices
. 1) The former is no longer needed (proje...ci/cd > license compliance
) to be deprecated and 2) anchors in the MR (to the policy section) link to the former LC section.
Additionally, the new policies section may be seen by both maintainers and developers. The current link in MR is only shown to the maintainer.
Also in "Licenses tab" in Pipeline view
Additional Notes (From Fernando)
-
We should AUDIT other places we link from. These 2 areas are the only ones I'm aware of. (-Fernando)
We need to add Vue Routing to handle navigating to the license compliance page + default selecting the "Policies" tab. (Policies tab represents the License Compliance from Settings -> CI/CD area)
Intended users
- Compliance Role wants to see that they are following policies that have been set, edit policies as needed, and set policies for unclassified licenses.
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Sam (Security Analyst)\
- Legal and/or person responsible for orgs compliance
Proposal
After the completion of #14061 (closed):
- Revise anchors in MR UI to link to new policies tab (flows below)
- Remove the deprecated LC section
project > settings > ci/cd > license compliance
.
Permissions and Security
- Developer view has an anchor that leads to
View policies
policies - Maintainer view has an anchor that leads to
Manage Licenses
view/add/edit/delete policies - Public projects policy section is not visible to non-project participants (#33659 (closed))
- not logged in - no tab and no count
Implementation
-
Change ee/gitlab_routing_helper.rb to return link to -/licenses
(plus hash to activate the policy tab) -
Add logic to license_compliance/components/app.vue to support linking to a tab (mapping window.location.hash
todata.tabIndex
)
Documentation
-
Update https://docs.gitlab.com/ee/user/compliance/license_compliance/#license-list to reflect the changes
Testing
-
Add tests to ensure the hash-linking to individual tabs within license_compliance/components/app.vue to support linking to a tab (mapping window.location.hash
todata.tabIndex
) works as expected
Edited by -