Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F434909
PhabricatorOAuthClientDeleteController.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
PhabricatorOAuthClientDeleteController.php
View Options
<?php
final
class
PhabricatorOAuthClientDeleteController
extends
PhabricatorOAuthClientController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$viewer
=
$request
->
getUser
();
$client
=
id
(
new
PhabricatorOAuthServerClientQuery
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
array
(
$this
->
getClientPHID
()))
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
if
(!
$client
)
{
return
new
Aphront404Response
();
}
if
(
$request
->
isFormPost
())
{
$client
->
delete
();
$app_uri
=
$this
->
getApplicationURI
();
return
id
(
new
AphrontRedirectResponse
())->
setURI
(
$app_uri
);
}
$dialog
=
id
(
new
AphrontDialogView
())
->
setUser
(
$viewer
)
->
setTitle
(
pht
(
'Delete OAuth Application?'
))
->
appendParagraph
(
pht
(
'Really delete the OAuth application %s?'
,
phutil_tag
(
'strong'
,
array
(),
$client
->
getName
())))
->
addCancelButton
(
$client
->
getViewURI
())
->
addSubmitButton
(
pht
(
'Delete Application'
));
return
id
(
new
AphrontDialogResponse
())->
setDialog
(
$dialog
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 3, 7:03 PM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
57927
Default Alt Text
PhabricatorOAuthClientDeleteController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment