1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Fix missing URI for "OAuthServerClient" object handles, causing dialog with no button

Summary:
Ref T13330. Handles for "OAuthServerClient" objects currently do not have a URI, which causes some obscure fallout like a missing "Close" button when examining their transactions.

Add a URI.

Test Plan:
  - Viewed an OAuth server client detail page.
  - Edited a policy, changing it to a custom policy.
  - Clicked "Custom Policy" in the resulting transaction to view a dialog explaining the changes.
  - Before change: dialog has no close button.
  - After change: dialog has a close button.

{F6534121}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13330

Differential Revision: https://secure.phabricator.com/D20624
This commit is contained in:
epriestley 2019-06-29 08:25:58 -07:00
parent d6dc5d8e68
commit 0e2cb6e7c4
2 changed files with 9 additions and 1 deletions

View file

@ -32,7 +32,9 @@ final class PhabricatorOAuthServerClientPHIDType extends PhabricatorPHIDType {
foreach ($handles as $phid => $handle) {
$client = $objects[$phid];
$handle->setName($client->getName());
$handle
->setName($client->getName())
->setURI($client->getURI());
}
}

View file

@ -59,6 +59,12 @@ final class PhabricatorOAuthServerClient
PhabricatorOAuthServerClientPHIDType::TYPECONST);
}
public function getURI() {
return urisprintf(
'/oauthserver/client/view/%d/',
$this->getID());
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */