Show agents even if only a dev on subgroup

MR: Show agents even if only a dev on subgroup (!139031 - merged)

Description

Show agents even if only a dev on subgroup

  • Do not require that users be a developer on the root group in order to use an agent to create a workspace, only need to be a developer on a subgroup containing the agent.

As a workspace admin, I want to allow users to use Remote Development Workspaces without being required to grant them developer access to the root namespace/group

Acceptance Criteria

  • If a user is a developer on a sub-group (non-root), and there is a valid agent under that group, they can create a workspace for a project under that group.
  • There should not be any duplicate agents returned

See "How to set up and validate locally" section on the MR description for details

Technical Requirements

  • Change the agent-finding algorithm on the client code in ee/app/assets/javascripts/remote_development/graphql/queries/get_group_cluster_agents.query.graphql to not just look in the root group.
  • Instead, search each level in the group hierarchy, and return all agents at all levels
  • Remove any duplicates before displaying

Design Requirements

No design or UI changes.

Impact Assessment

Allows usage of the Remote Development feature by enterprises whose security rules may prevent granting workspace users developer access to the root group.

Screenshots

Example of user assigned as developer only to sub-group

See reported_user_20:

Screenshot_2023-12-10_at_8.27.43_PM

Before error for user when selecting a project

Screenshot_2023-12-10_at_8.28.30_PM

After success for user when selecting a project

Screenshot_2023-12-10_at_8.28.03_PM

Edited by Chad Woolley