Fix permission issue for On-demand scans form

What does this MR do and why?

This resolves an issue where non-owners or non-maintainers accessing the On-demand Scans form encounter a consistent error when trying to load runner tags.

It prevents the runner tag dropdown from rendering when the user does not have permission to access tags. While editing the On-demand scans is not allowed, so we don't really have to fetch / render the dropdown values at all.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image.png image.png

How to set up and validate locally

  1. Visit the On-demand scans page for a project where you are only a developer and not a maintainer/owner.
  2. The top of the page would consistently show a GraphQL error.
  3. With this change, the error should be not thrown as well as the runner tag dropdown shouldn't be rendered.
Edited by Dheeraj Joshi

Merge request reports

Loading