Skip to content

GraphQL Environment permissions

Shinya Maeda requested to merge graphql-environment-permission into master

What does this MR do and why?

This MR exposes permissions related to Environment through expose_permissions. This unblocks the frontend work scheduled in Convert Environment Details page from HAML to V... (#23036 - closed).

Related #371953 (closed)

Screenshots or screen recordings

Query example:

{
  project(fullPath: "dosuken-org/deployment-approval-test") {
    environment(name: "production") {
      id
      userPermissions {
        updateEnvironment
        destroyEnvironment
        stopEnvironment
      }
    }
  }
}

Response example:

{
  "data": {
    "project": {
      "environment": {
        "id": "gid://gitlab/Environment/72",
        "userPermissions": {
          "updateEnvironment": true,
          "destroyEnvironment": false,
          "stopEnvironment": true
        }
      }
    }
  }
}

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.

Edited by Shinya Maeda

Merge request reports

Loading