Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102492149
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
Fri, Feb 21, 06:54
Size
903 B
Mime Type
text/x-php
Expires
Sun, Feb 23, 06:54 (2 d)
Engine
blob
Format
Raw Data
Handle
24332533
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