Implement Duo Workflow feature checks in Rails
We want to add checks for Duo Workflow permissions and expose them through rails graphql API.
Duo Workflow permissions
- Current project is on an Ultimate plan
- Current project has AI enabled
- Current project has experimental setting enabled for AI features
- Current user has access to the AI feature? Role developer or higher on the project
- Is the Feature flag
duo_workflowenabled
The query could look like:
query getDuoWorkflowPermissions{
project(fullPath: "gitlab-org/gitlab"){
id
userPermissions{
duoWorkflow //hash to get all data {
allowed // Boolean composite value of all checks
checks {
isUltimatePlan
isDuoEnabled
withExperimentSettings
isUserAllowed
isFeatureFlagEnabled
}
}
}
}
}