3 final class PhabricatorMailMustEncryptHeraldAction
6 const DO_MUST_ENCRYPT
= 'do.must-encrypt';
8 const ACTIONCONST
= 'email.must-encrypt';
10 public function getHeraldActionName() {
11 return pht('Require secure email');
14 public function renderActionDescription($value) {
16 'Require mail content be transmitted only over secure channels.');
18 public function supportsObject($object) {
19 return PhabricatorMetaMTAEmailHeraldAction
::isMailGeneratingObject($object);
22 public function getActionGroupKey() {
23 return HeraldUtilityActionGroup
::ACTIONGROUPKEY
;
26 public function supportsRuleType($rule_type) {
27 return ($rule_type != HeraldRuleTypeConfig
::RULE_TYPE_PERSONAL
);
30 public function getHeraldActionStandardType() {
31 return self
::STANDARD_NONE
;
34 public function applyEffect($object, HeraldEffect
$effect) {
35 $rule_phid = $effect->getRule()->getPHID();
37 $adapter = $this->getAdapter();
38 $adapter->addMustEncryptReason($rule_phid);
40 $this->logEffect(self
::DO_MUST_ENCRYPT
, array($rule_phid));
43 protected function getActionEffectMap() {
45 self
::DO_MUST_ENCRYPT
=> array(
46 'icon' => 'fa-shield',
48 'name' => pht('Must Encrypt'),
53 protected function renderActionEffectDescription($type, $data) {
55 case self
::DO_MUST_ENCRYPT
:
57 'Made it a requirement that mail content be transmitted only '.
58 'over secure channels.');