Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94243303
PhabricatorCalendarEventHostPolicyRule.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
Thu, Dec 5, 01:52
Size
921 B
Mime Type
text/x-php
Expires
Sat, Dec 7, 01:52 (2 d)
Engine
blob
Format
Raw Data
Handle
22768052
Attached To
rPH Phabricator
PhabricatorCalendarEventHostPolicyRule.php
View Options
<?php
final
class
PhabricatorCalendarEventHostPolicyRule
extends
PhabricatorPolicyRule
{
public
function
getObjectPolicyKey
()
{
return
'calendar.event.host'
;
}
public
function
getObjectPolicyName
()
{
return
pht
(
'Event Host'
);
}
public
function
getPolicyExplanation
()
{
return
pht
(
'The host of this event can take this action.'
);
}
public
function
getRuleDescription
()
{
return
pht
(
'event host'
);
}
public
function
canApplyToObject
(
PhabricatorPolicyInterface
$object
)
{
return
(
$object
instanceof
PhabricatorCalendarEvent
);
}
public
function
applyRule
(
PhabricatorUser
$viewer
,
$value
,
PhabricatorPolicyInterface
$object
)
{
$viewer_phid
=
$viewer
->
getPHID
();
if
(!
$viewer_phid
)
{
return
false
;
}
return
(
$object
->
getHostPHID
()
==
$viewer_phid
);
}
public
function
getValueControlType
()
{
return
self
::
CONTROL_TYPE_NONE
;
}
}
Event Timeline
Log In to Comment