mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
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
This commit is contained in:
parent
56a9709008
commit
b7be4ccca1
2 changed files with 40 additions and 10 deletions
|
@ -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".
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue