Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F547817
PhabricatorSSHKeysSettingsPanel.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
PhabricatorSSHKeysSettingsPanel.php
View Options
<?php
final
class
PhabricatorSSHKeysSettingsPanel
extends
PhabricatorSettingsPanel
{
public
function
isManagementPanel
()
{
if
(
$this
->
getUser
()->
getIsMailingList
())
{
return
false
;
}
return
true
;
}
public
function
getPanelKey
()
{
return
'ssh'
;
}
public
function
getPanelName
()
{
return
pht
(
'SSH Public Keys'
);
}
public
function
getPanelMenuIcon
()
{
return
'fa-file-text-o'
;
}
public
function
getPanelGroupKey
()
{
return
PhabricatorSettingsAuthenticationPanelGroup
::
PANELGROUPKEY
;
}
public
function
processRequest
(
AphrontRequest
$request
)
{
$user
=
$this
->
getUser
();
$viewer
=
$request
->
getUser
();
$keys
=
id
(
new
PhabricatorAuthSSHKeyQuery
())
->
setViewer
(
$viewer
)
->
withObjectPHIDs
(
array
(
$user
->
getPHID
()))
->
withIsActive
(
true
)
->
execute
();
$table
=
id
(
new
PhabricatorAuthSSHKeyTableView
())
->
setUser
(
$viewer
)
->
setKeys
(
$keys
)
->
setCanEdit
(
true
)
->
setNoDataString
(
pht
(
"You haven't added any SSH Public Keys."
));
$panel
=
new
PHUIObjectBoxView
();
$header
=
new
PHUIHeaderView
();
$ssh_actions
=
PhabricatorAuthSSHKeyTableView
::
newKeyActionsMenu
(
$viewer
,
$user
);
return
$this
->
newBox
(
pht
(
'SSH Public Keys'
),
$table
,
array
(
$ssh_actions
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:38 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
118592
Default Alt Text
PhabricatorSSHKeysSettingsPanel.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment