diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 543c574d58..940cd35b92 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -422,17 +422,43 @@ final class DifferentialRevisionViewController extends DifferentialController { $page_pane = id(new DifferentialPrimaryPaneView()) ->setID($pane_id) - ->appendChild(array( - $comment_view, - $diff_history, - $warning, - $local_view, - $toc_view, - $other_view, - $changeset_view, - )); - if ($comment_form) { + ->appendChild($comment_view); + $signatures = DifferentialRequiredSignaturesField::loadForRevision( + $revision); + $missing_signatures = false; + foreach ($signatures as $phid => $signed) { + if (!$signed) { + $missing_signatures = true; + } + } + + if ($missing_signatures) { + $signature_message = id(new PHUIInfoView()) + ->setErrors( + array( + array( + phutil_tag('strong', array(), pht('Content Hidden:')), + ' ', + pht( + 'The content of this revision is hidden until the author has '. + 'signed all of the required legal agreements.'), + ), + )); + $page_pane->appendChild($signature_message); + } else { + $page_pane->appendChild( + array( + $diff_history, + $warning, + $local_view, + $toc_view, + $other_view, + $changeset_view, + )); + } + + if ($comment_form) { $page_pane->appendChild($comment_form); } else { // TODO: For now, just use this to get "Login to Comment". diff --git a/src/docs/user/userguide/legalpad.diviner b/src/docs/user/userguide/legalpad.diviner index 0d235d61cc..053f275d9f 100644 --- a/src/docs/user/userguide/legalpad.diviner +++ b/src/docs/user/userguide/legalpad.diviner @@ -56,6 +56,10 @@ After you've done this, all new reviews created in Differential by authors who have not signed the document will trigger a signature requirement. These reviews can not be accepted until the document has been signed. +The content of these revisions will also be hidden until the document has been +signed. This prevents reviewers from being tainted by examining the changes if +the author ultimately declines to sign the CLA. + If the author has already signed all of the required documents, Herald will not take any actions. This reduces the amount of noise the CLA process generates for regular contributors.