Add a Herald action to trigger "Must Encrypt" for mail
Summary: Depends on D18983. Ref T13053. Adds a new Herald action to activate the "must encrypt" flag and drop mail content.
Test Plan:
- Created a new Herald rule:
{F5407075}
- Created a "dog task" (woof woof, unsecure) and a "duck task" (quack quack, secure).
- Viewed mail for both in `bin/mail` and web UI, saw appropriate security/encryption behavior.
- Viewed "Must Encrypt" in "Headers" tab for the duck mail, saw why the mail was encrypted (link to Herald rule).
Reviewers: amckinley
Reviewed By: amckinley
Maniphest Tasks: T13053
Differential Revision: https://secure.phabricator.com/D18984
This commit is contained in:
@@ -175,6 +175,15 @@ final class PhabricatorMetaMTAMailViewController
|
||||
$properties->addProperty($key, $value);
|
||||
}
|
||||
|
||||
$encrypt_phids = $mail->getMustEncryptReasons();
|
||||
if ($encrypt_phids) {
|
||||
$properties->addProperty(
|
||||
pht('Must Encrypt'),
|
||||
$viewer->loadHandles($encrypt_phids)
|
||||
->renderList());
|
||||
}
|
||||
|
||||
|
||||
return $properties;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user