Skip to content

Update mutation to unassign security policy from a group

What does this MR do and why?

This change modifies mutation to unassign security policy project. It changes the name of the argument from projectPath (and deprecates it) to fullPath. And allows to unassign security policy project from a group (with feature flag enabled).

How to set up and validate locally

  1. Create a new group.
  2. Enable feature flag for your group in rails console: Feature.enable(:group_level_security_policies, group)
  3. Create a new project.
  4. Go to GraphQL Explorer and run to assign project to your group:
mutation {
  securityPolicyProjectAssign(input: { fullPath: "your-group", securityPolicyProjectId: "gid://gitlab/Project/1" }) {
    errors
  }
}
  1. Go to GraphQL Explorer and run to unassign project to your group:
mutation {
  securityPolicyProjectUnassign(input: { fullPath: "your-group" }) {
    errors
  }
}

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

Merge request reports

Loading