Allow users to report AI Catalog items
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
About
We want to allow people to report AI Catalog items to the instance admin.
The instance admin will be able to delete the item if they choose, through the feature in !209547 (merged). We must guide admins to hard-delete the items. As hard deleting will also remove it from any projects it had been enabled for #579029 (comment 2861851675).
Proposal
We will allow logged-in users to report AI Catalog items to the instance's configured abuse_notification_email.
- Frontend: Reporting AI Catalog items through the
...menu. - Backend: Submitting the report through a new mutation.
See design recommendations in #579029.
Add documentation for how admins can delete AI Catalog items.
The reporting UI should be displayed when a new userPermissions field called reportAiCatalogItem is true. This field will be implemented by the backend.
The form should submit:
-
required
reasonwill be enum of options -
optional
bodylimited to 1000 characters
Form will submit the arguments to a new aiCatalogItemReport mutation.
Add new ability to ItemPolicy called report_ai_catalog_item.
The permission will be true when:
-
current_user.present?(user must be logged in) -
Gitlab::CurrentSettings.current_application_settings.abuse_notification_email.present?the application setting must be present
Add the new permission to AiCatalogItemPermissions so that the frontend can read it.
New aiCatalogItemReport mutation, marked as experiment.
Mutation arguments:
-
required
reasonenum of options -
optional
bodylimited to 1000 characters
Mutation will authorize using the new report_ai_catalog_item ability.
Mutation will submit a new email notification to Gitlab::CurrentSettings.current_application_settings.abuse_notification_email.
See https://docs.gitlab.com/development/emails/ for details on implementing new email mailers.