Skip to content

GraphQL: Return error from runners query if permissions missing

What does this MR do and why?

This MR changes the behavior of the GraphQL RunnersResolver to return an error instead of returning an empty array when the user doesn't have the required permissions. This is done for clarity to the end user. It also fixes the documentation to correctly state that only users with administrative permissions can use it (I've taken the existing description for https://docs.gitlab.com/ee/api/runners.html#list-all-runners).

Changelog: fixed

Closes #422846 (closed)

Screenshots or screen recordings

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

Scenario GraphQL
Current behavior image
Proposed behavior image

How to set up and validate locally

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.

Merge request reports