Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92294732
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
Tue, Nov 19, 04:11
Size
921 B
Mime Type
text/x-php
Expires
Thu, Nov 21, 04:11 (2 d)
Engine
blob
Format
Raw Data
Handle
22415525
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