Skip to content

Add blocked content entry

What does this MR do and why?

JH is adding content validation service to prevent abuse/porn/voilent/ content appearing in repo/commit/diff/wiki/snippets see details in this issue https://gitlab.com/gitlab-jh/gitlab/-/issues/174 , the related JH MR is gitlab-jh/gitlab!128 (closed)

This MR is adding some haml and vue entry in frontend so that we can choose to override the entry in JH to block illegal contents mentioned before.

Screenshots or screen recordings

How to set up and validate locally

  1. checkout 247-add-async-content-validation-hook branch in JH, run bundle exec rails c

    ContentBlockedState.create(commit_sha: "83c6aa31482b9076531ed3a880e75627fd6b335c", blob_sha: "xx", path: "README.md", container_identifier: "project-17")
  2. browse the file in repo

  3. same process for wiki/diff/commit/

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kun Qian

Merge request reports