mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +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:
parent
ffc8a7edc7
commit
edf88225f5
1 changed files with 11 additions and 6 deletions
|
@ -261,12 +261,17 @@ final class PhabricatorProjectProfileController
|
|||
}
|
||||
}
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setIcon('fa-book grey')
|
||||
->setName(pht('View Wiki'))
|
||||
->setWorkflow(true)
|
||||
->setHref('/project/wiki/'));
|
||||
$have_phriction = PhabricatorApplication::isClassInstalledForViewer(
|
||||
'PhabricatorPhrictionApplication',
|
||||
$viewer);
|
||||
if ($have_phriction) {
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setIcon('fa-book grey')
|
||||
->setName(pht('View Wiki'))
|
||||
->setWorkflow(true)
|
||||
->setHref('/project/wiki/'));
|
||||
}
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue