Filter out unlicensed widgets from work item types list
What does this MR do and why?
We want to check licensing at the group or project level when returning widget definitions for a given work item type. This widgets are exposed in our GraphQL API through group.workItemTypes
or project.workItemTypes
.
The change affects a lot of files since we now require a resource parent as context to list what widgets are available for that given group or project in addition to the definitions we have set for that work item type
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Go to GraphiQL locally at http://localhost:3000/-/graphql-explorer
- Run the following query
{
group(fullPath: "flightjs") {
id
workItemTypes {
nodes {
id
name
widgetDefinitions {
type
}
}
}
}
}
The response should be different in the Epic
work item type for example. If you remove the license from your local instance and restart, you should not get the COLOR
widget in the epic type definitions
Related to Filter work item type licensed widgets in GQL API (#433315 - closed)
TL;DR We want to filter out licensed widgets on the response so the frontend can render create/update form according to the widgets a user making the request can or cannot change