@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.

Users with no build plan capabilities should see "New Build Plan" button as greyed out and a modal dialog explaining the policy.

Summary: Fixes T7499, New Build Plan button should be greyed out in Harbormaster list view.

Test Plan: Login as non-admin user, navigate to Harbormaster, New Build Plan button should be greyed out and clicking it should result in a "You Shall Not Pass" modal dialog that does not navigate away from build list view.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7499

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

authored by

lkassianik and committed by
epriestley
80acaf68 f347c002

+5
+5
src/applications/harbormaster/controller/HarbormasterController.php
··· 5 5 protected function buildApplicationCrumbs() { 6 6 $crumbs = parent::buildApplicationCrumbs(); 7 7 8 + $can_create = $this->hasApplicationCapability( 9 + HarbormasterManagePlansCapability::CAPABILITY); 10 + 8 11 $crumbs->addAction( 9 12 id(new PHUIListItemView()) 10 13 ->setName(pht('New Build Plan')) 11 14 ->setHref($this->getApplicationURI('plan/edit/')) 15 + ->setDisabled(!$can_create) 16 + ->setWorkflow(!$can_create) 12 17 ->setIcon('fa-plus-square')); 13 18 14 19 return $crumbs;