Skip to content

Add mutation to unlink policy project

What does this MR do and why?

This change adds new mutation that allows users to unlink security orchestration policy project from selected project.

Mutation

mutation {
  securityPolicyProjectUnassign(input: { projectPath: "root/project" }) {
    errors
  }
}

Success:

{
  "data": {
    "securityPolicyProjectUnassign": {
      "errors": []
    }
  }
}

Failure:

{
  "data": {
    "securityPolicyProjectUnassign": {
      "errors": [
        "Policy project doesn't exist"
      ]
    }
  }
}

How to set up and validate locally

  1. Create new project.
  2. Go to GraphQL explorer, use securityPolicyProjectAssign mutation to assign policy project to selected project.
  3. In GraphQL explorer use securityPolicyProjectUnassign to remove association.
  4. Verify if securityPolicyProject is no longer associated with the project.

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 #343268 (closed)

Merge request reports

Loading