Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106817191
PhabricatorSSHKeysSettingsPanel.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
Tue, Apr 1, 02:09
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Apr 3, 02:09 (2 d)
Engine
blob
Format
Raw Data
Handle
25281655
Attached To
rPH Phabricator
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
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
);
$header
->
setHeader
(
pht
(
'SSH Public Keys'
));
$header
->
addActionLink
(
$ssh_actions
);
$panel
->
setHeader
(
$header
);
$panel
->
setTable
(
$table
);
$panel
->
setBackground
(
PHUIObjectBoxView
::
BLUE_PROPERTY
);
return
$panel
;
}
}
Event Timeline
Log In to Comment