Skip to content

Graphql endpoint for listing all custom roles

Jarka Košanová requested to merge 422711-api-list-custom-roles into master

What does this MR do and why?

How to set up and validate locally

Graphql query

query memberRoleAbilitiesList {
  memberRolePermissions {
    nodes {
      availableFor
      description
      name
      requirement
      value
    }
  }
}
And response
{
  "data": {
    "memberRolePermissions": {
      "nodes": [
        {
          "availableFor": [
            "project"
          ],
          "description": "Allows admin access to the merge requests.",
          "name": "Admin merge request",
          "requirement": null,
          "value": "admin_merge_request"
        },
        {
          "availableFor": [
            "project",
            "group"
          ],
          "description": "Allows admin access to the vulnerability reports.",
          "name": "Admin vulnerability",
          "requirement": "read_vulnerability",
          "value": "admin_vulnerability"
        },
        {
          "availableFor": [
            "project"
          ],
          "description": "Allows read-only access to the source code.",
          "name": "Read code",
          "requirement": null,
          "value": "read_code"
        },
        {
          "availableFor": [
            "project",
            "group"
          ],
          "description": "Allows read-only access to the dependencies.",
          "name": "Read dependency",
          "requirement": null,
          "value": "read_dependency"
        },
        {
          "availableFor": [
            "project",
            "group"
          ],
          "description": "Allows read-only access to the vulnerability reports.",
          "name": "Read vulnerability",
          "requirement": null,
          "value": "read_vulnerability"
        }
      ]
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #422711 (closed)

Edited by Jarka Košanová

Merge request reports

Loading