Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F549542
PhabricatorMailMustEncryptHeraldAction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorMailMustEncryptHeraldAction.php
View Options
<?php
final
class
PhabricatorMailMustEncryptHeraldAction
extends
HeraldAction
{
const
DO_MUST_ENCRYPT
=
'do.must-encrypt'
;
const
ACTIONCONST
=
'email.must-encrypt'
;
public
function
getHeraldActionName
()
{
return
pht
(
'Require secure email'
);
}
public
function
renderActionDescription
(
$value
)
{
return
pht
(
'Require mail content be transmitted only over secure channels.'
);
}
public
function
supportsObject
(
$object
)
{
return
PhabricatorMetaMTAEmailHeraldAction
::
isMailGeneratingObject
(
$object
);
}
public
function
getActionGroupKey
()
{
return
HeraldUtilityActionGroup
::
ACTIONGROUPKEY
;
}
public
function
supportsRuleType
(
$rule_type
)
{
return
(
$rule_type
!=
HeraldRuleTypeConfig
::
RULE_TYPE_PERSONAL
);
}
public
function
getHeraldActionStandardType
()
{
return
self
::
STANDARD_NONE
;
}
public
function
applyEffect
(
$object
,
HeraldEffect
$effect
)
{
$rule_phid
=
$effect
->
getRule
()->
getPHID
();
$adapter
=
$this
->
getAdapter
();
$adapter
->
addMustEncryptReason
(
$rule_phid
);
$this
->
logEffect
(
self
::
DO_MUST_ENCRYPT
,
array
(
$rule_phid
));
}
protected
function
getActionEffectMap
()
{
return
array
(
self
::
DO_MUST_ENCRYPT
=>
array
(
'icon'
=>
'fa-shield'
,
'color'
=>
'blue'
,
'name'
=>
pht
(
'Must Encrypt'
),
),
);
}
protected
function
renderActionEffectDescription
(
$type
,
$data
)
{
switch
(
$type
)
{
case
self
::
DO_MUST_ENCRYPT
:
return
pht
(
'Made it a requirement that mail content be transmitted only '
.
'over secure channels.'
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 2:11 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121668
Default Alt Text
PhabricatorMailMustEncryptHeraldAction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment