1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

Don't show "View Wiki" reminder link if viewer has no access to Phriction

Summary: Fixes T6581.

Test Plan:
  - Loaded project page with Phriction accessible, saw link.
  - Loaded project page with Phriction uninstalled, no link.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6581

Differential Revision: https://secure.phabricator.com/D10868
This commit is contained in:
epriestley 2014-11-18 11:41:31 -08:00
parent ffc8a7edc7
commit edf88225f5

View file

@ -261,12 +261,17 @@ final class PhabricatorProjectProfileController
} }
} }
$view->addAction( $have_phriction = PhabricatorApplication::isClassInstalledForViewer(
id(new PhabricatorActionView()) 'PhabricatorPhrictionApplication',
->setIcon('fa-book grey') $viewer);
->setName(pht('View Wiki')) if ($have_phriction) {
->setWorkflow(true) $view->addAction(
->setHref('/project/wiki/')); id(new PhabricatorActionView())
->setIcon('fa-book grey')
->setName(pht('View Wiki'))
->setWorkflow(true)
->setHref('/project/wiki/'));
}
return $view; return $view;
} }