Backend: apply 'verified' badges based on URL
Summary
From a discussion in #432535 (closed), we should have a way to mark components as "certified" in the Catalog.
Proposal
If the project path starts with one of the GitLab-owned groups (see below), we can display the badge "verified creator".
These are the groups we expect:
- gitlab.com/components - the upcoming official location (currently the group is in the process of being claimed).
- gitlab.com/gitlab-components - the current temporary location (we will move the components into gitlab.com/components)
- gitlab.com/gitlab-org - any components built by GitLab organization for the GitLab projects.
Track verifications in the database for those top-level groups by defining the verification badge as an enum:
- gitlab_owned: 10
- partners: 20
- community: 30
- unverified: nil
NOTE:
- We can infer that non-nil values means "verified".
- The enum value is used for filtering as well as sorting.
- We leave gaps between values to potentially introduce other values in the future without doing any data migrations.
Confirm purpose and User Reception (how does this benefit the user?)
The purpose is to show when components are certified because they are being built by project owners. This delivers a level of authenticity and confidence to users who wish to try them in their own project
Additional details
Some relevant technical details, if applicable, such as:
- Does this need a feature flag?
- Does there need to be an associated instrumentation issue created related to this work?
- Is there an example response showing the data structure that should be returned (new endpoints only)?
- What permissions should be used?
- Is this EE or CE?
-
EE -
CE
-
- Additional comments:
Implementation Table
| Group | Issue Link |
|---|---|
| frontend | #433394 (closed) |
| backend |
|