@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

"Create Application" button in OAuth Server application should be greyed out if user does not have correct capabilities.

Summary: Fixes T7497, "Create Application" button in Oauth Server application should be greyed out if user does not have correct capabilities and should open a "You Shall Not Pass" modal.

Test Plan: Login as non-admin, open OAuth Server application, "Create Application" button should be greyed out, and clicking it should open a modal dialog over the list view without navigating away from it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7497

Differential Revision: https://secure.phabricator.com/D12560

authored by

lkassianik and committed by
epriestley
3f77ad93 80acaf68

+5
+5
src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php
··· 25 25 protected function buildApplicationCrumbs() { 26 26 $crumbs = parent::buildApplicationCrumbs(); 27 27 28 + $can_create = $this->hasApplicationCapability( 29 + PhabricatorOAuthServerCreateClientsCapability::CAPABILITY); 30 + 28 31 $crumbs->addAction( 29 32 id(new PHUIListItemView()) 30 33 ->setHref($this->getApplicationURI('client/create/')) 31 34 ->setName(pht('Create Application')) 35 + ->setDisabled(!$can_create) 36 + ->setWorkflow(!$can_create) 32 37 ->setIcon('fa-plus-square')); 33 38 34 39 return $crumbs;