Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2895385
PassphraseCredentialAuthorPolicyRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1021 B
Referenced Files
None
Subscribers
None
PassphraseCredentialAuthorPolicyRule.php
View Options
<?php
final
class
PassphraseCredentialAuthorPolicyRule
extends
PhabricatorPolicyRule
{
public
function
getObjectPolicyKey
(
)
{
return
'passphrase.author'
;
}
public
function
getObjectPolicyName
(
)
{
return
pht
(
'Credential Author'
)
;
}
public
function
getPolicyExplanation
(
)
{
return
pht
(
'The author of this credential can take this action.'
)
;
}
public
function
getRuleDescription
(
)
{
return
pht
(
'credential author'
)
;
}
public
function
canApplyToObject
(
PhabricatorPolicyInterface
$object
)
{
return
(
$object
instanceof
PassphraseCredential
)
;
}
public
function
applyRule
(
PhabricatorUser
$viewer
,
$value
,
PhabricatorPolicyInterface
$object
)
{
$author_phid
=
$object
->
getAuthorPHID
(
)
;
if
(
!
$author_phid
)
{
return
false
;
}
$viewer_phid
=
$viewer
->
getPHID
(
)
;
if
(
!
$viewer_phid
)
{
return
false
;
}
return
(
$viewer_phid
==
$author_phid
)
;
}
public
function
getValueControlType
(
)
{
return
self
::
CONTROL_TYPE_NONE
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 21:24 (6 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128893
Default Alt Text
PassphraseCredentialAuthorPolicyRule.php (1021 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment