Skip to content

Expose user permissions on the WorkItem GraphQL type

Mario Celi requested to merge 346132-expose-work-item-permissions-gql into master

What does this MR do and why?

Use expose_permissions in WorkItem Type. Necessary for #346132 (closed)

Related to #346132 (closed)

How to set up and validate locally

  1. Run bundle exec rails console
  2. Run Feature.enable(:work_items)
  3. Execute a GraphQL query like
    {
      workItem(id: "gid://gitlab/WorkItem/260") {
        id
        userPermissions { deleteWorkItem readWorkItem updateWorkItem }
      }
    }
  4. You should get a response like:
    {
      "data": {
        "workItem": {
          "id": "gid://gitlab/WorkItem/260",
          "userPermissions": {
            "deleteWorkItem": true,
            "readWorkItem": true,
            "updateWorkItem": true
          }
        }
      }
    }
    

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 Mario Celi

Merge request reports

Loading