SBOM ingestion uses correct project archive check

What does this MR do and why?

Closes: #578803

This fixes up the last two areas where we don't use project.self_or_ancestors_archived?. It's effectively a small refactor where the new behaviour is a strict superset of the previous behaviour, which is why there's not a significant test change.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading