Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92731914
ManiphestTaskAuthorPolicyRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 23, 05:54
Size
903 B
Mime Type
text/x-php
Expires
Mon, Nov 25, 05:54 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
22489351
Attached To
rPH Phabricator
ManiphestTaskAuthorPolicyRule.php
View Options
<?php
final
class
ManiphestTaskAuthorPolicyRule
extends
PhabricatorPolicyRule
{
public
function
getObjectPolicyKey
()
{
return
'maniphest.author'
;
}
public
function
getObjectPolicyName
()
{
return
pht
(
'Task Author'
);
}
public
function
getPolicyExplanation
()
{
return
pht
(
'The author of this task can take this action.'
);
}
public
function
getRuleDescription
()
{
return
pht
(
'task author'
);
}
public
function
canApplyToObject
(
PhabricatorPolicyInterface
$object
)
{
return
(
$object
instanceof
ManiphestTask
);
}
public
function
applyRule
(
PhabricatorUser
$viewer
,
$value
,
PhabricatorPolicyInterface
$object
)
{
$viewer_phid
=
$viewer
->
getPHID
();
if
(!
$viewer_phid
)
{
return
false
;
}
return
(
$object
->
getAuthorPHID
()
==
$viewer_phid
);
}
public
function
getValueControlType
()
{
return
self
::
CONTROL_TYPE_NONE
;
}
}
Event Timeline
Log In to Comment