Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F955216
PhabricatorAuthSSHKeyController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
780 B
Referenced Files
None
Subscribers
None
PhabricatorAuthSSHKeyController.php
View Options
<?php
abstract
class
PhabricatorAuthSSHKeyController
extends
PhabricatorAuthController
{
protected
function
newKeyForObjectPHID
(
$object_phid
)
{
$viewer
=
$this
->
getViewer
();
$object
=
id
(
new
PhabricatorObjectQuery
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
array
(
$object_phid
))
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
if
(!
$object
)
{
return
null
;
}
// If this kind of object can't have SSH keys, don't let the viewer
// add them.
if
(!(
$object
instanceof
PhabricatorSSHPublicKeyInterface
))
{
return
null
;
}
return
PhabricatorAuthSSHKey
::
initializeNewSSHKey
(
$viewer
,
$object
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 5:03 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
225935
Default Alt Text
PhabricatorAuthSSHKeyController.php (780 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment