FE: Explore-level - Allow direct enablement by project maintainers
## About This issue is part of https://gitlab.com/groups/gitlab-org/-/work_items/20743+, see that epic and the feature refinement planning issue https://gitlab.com/gitlab-org/gitlab/-/issues/589457+ for more context. ## Proposal This feature will use the new feature flag `ai_catalog_project_level_enablement` being added in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/223681 for all changes. The flag will be scoped by current user. At explore-level, we will allow project maintainers to enable items directly. There will be no need for the item to have been enabled in the top level group first. When browsing the catalog from explore-level: - **On a public item**, users will always see an `Enable` button to enable the agent/flow directly in a project. Clicking the button will show a select list of projects the user is a maintainer of. If the user is not a maintainer of any projects, we will show an empty state with some copy TBD https://gitlab.com/gitlab-org/gitlab/-/issues/590573#note_3091927826 - **On a private item**, which can only be enabled within the owner project: - If the owner project has enabled the item already: Show `Enable` button as disabled. - If the owner project has enabled the item already: - If the user does not have permission to enable the item on the owner project (does not have `adminAiCatalogItem` permission on the project - this will be developers of the project who can see but not enable private items): Show `Enable` button as disabled - If the user has permission to enable the item on the owner project: We show `Enable` button as clickable. Clicking the button will enable the item in the owner project. (The backend will be changed in https://gitlab.com/gitlab-org/gitlab/-/issues/590419 to allow direct enabling by project maintainers using the same feature flag.) ![image](/uploads/5f4dedb1860bd5a7bf899d6bb3ce958b/image.png){width=651 height=162}
issue