Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F551925
PhabricatorCalendarEventHostPolicyRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
921 B
Referenced Files
None
Subscribers
None
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 4:00 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
123323
Default Alt Text
PhabricatorCalendarEventHostPolicyRule.php (921 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment