Defer group package settings requests on package pages
Problem to solve
When Adds request forwarding warning to package deta... (!117497 - merged) & Adds package forwarding warning to delete modal (!117342 - merged) was implemented, we added a fragment to request for group package settings to check if request forwarding is enabled.
However, there are conditions when group package settings need not be requested:
- If the user does not have permission to delete package(s) or package versions.
- If package type is not maven, pypi or npm (on the package details page)
Additionally on the package list page, the same data is requested for every page when paginated. This is not required since the data does not change between pages.
Solution
The request to get group package settings can be extracted into a separate query & be requested only if above conditions are met.
This is will also remove the need to request the same data on pagination.
Edited by Rahul Chanila