Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F548933
PhabricatorCalendarEventPolicyCodex.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorCalendarEventPolicyCodex.php
View Options
<?php
final
class
PhabricatorCalendarEventPolicyCodex
extends
PhabricatorPolicyCodex
{
public
function
getPolicyShortName
()
{
$object
=
$this
->
getObject
();
if
(!
$object
->
isImportedEvent
())
{
return
null
;
}
return
pht
(
'Uses Import Policy'
);
}
public
function
getPolicyIcon
()
{
$object
=
$this
->
getObject
();
if
(!
$object
->
isImportedEvent
())
{
return
null
;
}
return
'fa-download'
;
}
public
function
getPolicyTagClasses
()
{
$object
=
$this
->
getObject
();
if
(!
$object
->
isImportedEvent
())
{
return
array
();
}
return
array
(
'policy-adjusted-special'
,
);
}
public
function
getPolicySpecialRuleDescriptions
()
{
$object
=
$this
->
getObject
();
$rules
=
array
();
$rules
[]
=
$this
->
newRule
()
->
setDescription
(
pht
(
'The host of an event can always view and edit it.'
));
$rules
[]
=
$this
->
newRule
()
->
setCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
))
->
setDescription
(
pht
(
'Users who are invited to an event can always view it.'
));
$rules
[]
=
$this
->
newRule
()
->
setCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
))
->
setIsActive
(
$object
->
isImportedEvent
())
->
setDescription
(
pht
(
'Imported events can only be viewed by users who can view '
.
'the import source.'
));
$rules
[]
=
$this
->
newRule
()
->
setCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
setIsActive
(
$object
->
isImportedEvent
())
->
setDescription
(
pht
(
'Imported events can not be edited.'
));
return
$rules
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:57 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
99387
Default Alt Text
PhabricatorCalendarEventPolicyCodex.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment