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:
@@ -261,12 +261,17 @@ final class PhabricatorProjectProfileController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$have_phriction = PhabricatorApplication::isClassInstalledForViewer(
|
||||||
|
'PhabricatorPhrictionApplication',
|
||||||
|
$viewer);
|
||||||
|
if ($have_phriction) {
|
||||||
$view->addAction(
|
$view->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setIcon('fa-book grey')
|
->setIcon('fa-book grey')
|
||||||
->setName(pht('View Wiki'))
|
->setName(pht('View Wiki'))
|
||||||
->setWorkflow(true)
|
->setWorkflow(true)
|
||||||
->setHref('/project/wiki/'));
|
->setHref('/project/wiki/'));
|
||||||
|
}
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user