feat: #3632342 Refuse uploaded images unsuitable for a general audience with an AI image safety check

Issue: https://www.drupal.org/i/3632342

Adds an AI image safety check to the Image media type. The recipe installs Field Validation and AI Validations, and creates the rule set "AI image safety (Media: Image)": an AI Validations rule on the image field of Media: Image, for every role, that fails closed. A verifySetupAi preflight requires a default model for Chat with Image Vision, so the recipe stops before creating anything when none is set. The image field is saved once so the rule is active at once. README and CHANGELOG updated.

Tested on a Varbase 11 site: applies, re-applies cleanly, and with no default vision model stops with "The operation type 'chat_with_image_vision' does not have a default model" without creating the rule set; applies again once the model is restored.

AI-Generated: Yes

Checkpoints

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release
Edited by Rajab Natshah

Merge request reports

Loading
Loading