diff --git a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php index 0e2be7a105..217fa1d7b1 100644 --- a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php +++ b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php @@ -25,10 +25,15 @@ final class PhabricatorOAuthClientListController protected function buildApplicationCrumbs() { $crumbs = parent::buildApplicationCrumbs(); + $can_create = $this->hasApplicationCapability( + PhabricatorOAuthServerCreateClientsCapability::CAPABILITY); + $crumbs->addAction( id(new PHUIListItemView()) ->setHref($this->getApplicationURI('client/create/')) ->setName(pht('Create Application')) + ->setDisabled(!$can_create) + ->setWorkflow(!$can_create) ->setIcon('fa-plus-square')); return $crumbs;