Add UploadValidationListener extension point. Add pre-upload extension point to allow plugins to validate upload operations right before Gerrit begins to send a pack back to the git client. A plugin can interrupt the upload by throwing an exception which will cause the upload to fail and the exception’s message text will be reported to the git client. For example, a plugin may want to deny fetches for a specific project. Change-Id: I5d0aeac51b83bf14150fa3036f71965cf2051243
diff --git a/Documentation/config-validation.txt b/Documentation/config-validation.txt index b7843a7..5d23c79 100644 --- a/Documentation/config-validation.txt +++ b/Documentation/config-validation.txt
@@ -32,6 +32,19 @@ If the commit fails the validation, the plugin can throw an exception which will cause the merge to fail. +[[pre-upload-validation]] +== Pre-upload validation + + +Plugins implementing the `UploadValidationListener` interface can +perform additional validation checks before any upload operations +(clone, fetch, pull). The validation is executed right before Gerrit +begins to send a pack back to the git client. + +If upload fails the validation, the plugin can throw an exception +which will cause the upload to fail and the exception's message text +will be reported to the git client. + [[new-project-validation]] == New project validation