@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hide revision content if author has not signed required legal documents

Summary: Fixes T7446.

Test Plan: {F333301}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7446

Differential Revision: https://secure.phabricator.com/D12021

+40 -10
+36 -10
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 422 422 423 423 $page_pane = id(new DifferentialPrimaryPaneView()) 424 424 ->setID($pane_id) 425 - ->appendChild(array( 426 - $comment_view, 427 - $diff_history, 428 - $warning, 429 - $local_view, 430 - $toc_view, 431 - $other_view, 432 - $changeset_view, 433 - )); 434 - if ($comment_form) { 425 + ->appendChild($comment_view); 426 + 427 + $signatures = DifferentialRequiredSignaturesField::loadForRevision( 428 + $revision); 429 + $missing_signatures = false; 430 + foreach ($signatures as $phid => $signed) { 431 + if (!$signed) { 432 + $missing_signatures = true; 433 + } 434 + } 435 435 436 + if ($missing_signatures) { 437 + $signature_message = id(new PHUIInfoView()) 438 + ->setErrors( 439 + array( 440 + array( 441 + phutil_tag('strong', array(), pht('Content Hidden:')), 442 + ' ', 443 + pht( 444 + 'The content of this revision is hidden until the author has '. 445 + 'signed all of the required legal agreements.'), 446 + ), 447 + )); 448 + $page_pane->appendChild($signature_message); 449 + } else { 450 + $page_pane->appendChild( 451 + array( 452 + $diff_history, 453 + $warning, 454 + $local_view, 455 + $toc_view, 456 + $other_view, 457 + $changeset_view, 458 + )); 459 + } 460 + 461 + if ($comment_form) { 436 462 $page_pane->appendChild($comment_form); 437 463 } else { 438 464 // TODO: For now, just use this to get "Login to Comment".
+4
src/docs/user/userguide/legalpad.diviner
··· 56 56 have not signed the document will trigger a signature requirement. These reviews 57 57 can not be accepted until the document has been signed. 58 58 59 + The content of these revisions will also be hidden until the document has been 60 + signed. This prevents reviewers from being tainted by examining the changes if 61 + the author ultimately declines to sign the CLA. 62 + 59 63 If the author has already signed all of the required documents, Herald will not 60 64 take any actions. This reduces the amount of noise the CLA process generates for 61 65 regular contributors.