Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103224327
DifferentialDiffViewPolicyFieldSpecification.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 28, 07:40
Size
609 B
Mime Type
text/x-php
Expires
Sun, Mar 2, 07:40 (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
24517783
Attached To
rPH Phabricator
DifferentialDiffViewPolicyFieldSpecification.php
View Options
<?php
final
class
DifferentialDiffViewPolicyFieldSpecification
extends
DifferentialFieldSpecification
{
public
function
shouldAppearOnDiffView
()
{
return
true
;
}
public
function
renderLabelForDiffView
()
{
return
pht
(
'Visible To'
);
}
public
function
renderValueForDiffView
()
{
$user
=
$this
->
getUser
();
$diff
=
$this
->
getDiff
();
$descriptions
=
PhabricatorPolicyQuery
::
renderPolicyDescriptions
(
$user
,
$diff
);
// TODO: Clean this up with new policy UI.
$policy
=
idx
(
$descriptions
,
PhabricatorPolicyCapability
::
CAN_VIEW
);
return
$policy
[
1
];
}
}
Event Timeline
Log In to Comment