Update mutation to create project and assign security policy to a group
requested to merge 347069-update-graphql-mutation-to-assign-security-policy-project-to-group into master
What does this MR do and why?
This change modifies mutations to assign security policy project and create security policy project. It changes the name of the argument from projectPath
(and deprecates it) to fullPath
.
And allows to assign security policy project to a group (with feature flag enabled) and create security policy project for a group (with feature flag enabled).
Initially creating the policy project was extracted to separate MR: !83189 (closed), however they are tightly connected, so I've decided to proceed with review in single MR.
How to set up and validate locally
- Create a new group.
- Enable feature flag for your group in
rails console
:Feature.enable(:group_level_security_policies, group)
- Create a new project.
- Go to GraphQL Explorer and run:
mutation {
securityPolicyProjectAssign(input: { fullPath: "your-group", securityPolicyProjectId: "gid://gitlab/Project/1" }) {
errors
}
}
and
mutation {
securityPolicyProjectCreate(input: { fullPath: "your-group" }) {
errors
project {
id
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #347069 (closed)
Edited by Alan (Maciej) Paruszewski