Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97226679
PhabricatorAuthSSHKeyTransaction.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
Fri, Jan 3, 14:51
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 5, 14:51 (2 d)
Engine
blob
Format
Raw Data
Handle
23355796
Attached To
rPH Phabricator
PhabricatorAuthSSHKeyTransaction.php
View Options
<?php
final
class
PhabricatorAuthSSHKeyTransaction
extends
PhabricatorApplicationTransaction
{
const
TYPE_NAME
=
'sshkey.name'
;
const
TYPE_KEY
=
'sshkey.key'
;
const
TYPE_DEACTIVATE
=
'sshkey.deactivate'
;
public
function
getApplicationName
()
{
return
'auth'
;
}
public
function
getApplicationTransactionType
()
{
return
PhabricatorAuthSSHKeyPHIDType
::
TYPECONST
;
}
public
function
getApplicationTransactionCommentObject
()
{
return
null
;
}
public
function
getTitle
()
{
$author_phid
=
$this
->
getAuthorPHID
();
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
switch
(
$this
->
getTransactionType
())
{
case
PhabricatorTransactions
::
TYPE_CREATE
:
return
pht
(
'%s created this key.'
,
$this
->
renderHandleLink
(
$author_phid
));
case
self
::
TYPE_NAME
:
return
pht
(
'%s renamed this key from "%s" to "%s".'
,
$this
->
renderHandleLink
(
$author_phid
),
$old
,
$new
);
case
self
::
TYPE_KEY
:
return
pht
(
'%s updated the public key material for this SSH key.'
,
$this
->
renderHandleLink
(
$author_phid
));
case
self
::
TYPE_DEACTIVATE
:
if
(
$new
)
{
return
pht
(
'%s revoked this key.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
else
{
return
pht
(
'%s reinstated this key.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
}
return
parent
::
getTitle
();
}
}
Event Timeline
Log In to Comment