Skip to content

Cloud License: GraphQL and policy

Mark Chao requested to merge 273501-graphql into master

What does this MR do?

Implement gitlab subscription activate API.

A global policy is added so only admin can use this API endpoint.

Since this is a new feature still under development, and is blocked by application setting cloud_license_enabled, I did not include a feature flag, nor changelog as the feature is not public yet.

One thing I am unsure of, is whether documenting this is necessary? This is an API for our subscription activation, instead of a real feature. It can also be subject to change as we may have to change the process in the future.

GraphQL query:

mutation($gitlabSubscriptionActivateInput: GitlabSubscriptionActivateInput!) {
  gitlabSubscriptionActivate(input: $gitlabSubscriptionActivateInput) {
    clientMutationId
errors
  }
}

Input:

{
  "gitlabSubscriptionActivateInput": {
    "activationCode": "gEg959hDCkvM2d4Der5RyktT"
  }
}

Output:

{
  "data": {
    "gitlabSubscriptionActivate": {
      "clientMutationId": null,
      "errors": []
    }
  }
}

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #273501

Edited by Rémy Coutable

Merge request reports