Hide "Revision" column in Diffusion history view if Differential is uninstalled
Summary: Fixes T9481. If the viewer does not have access to Differential (for example, because it is not installed), hide the "Revision" column in Diffusion. Test Plan: - Viewed history, saw "Revision" column. - Uninstalled Differential, reloaded, no "Revision" column. Reviewers: chad Reviewed By: chad Subscribers: revi Maniphest Tasks: T9481 Differential Revision: https://secure.phabricator.com/D14188
This commit is contained in:
@@ -88,6 +88,11 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
|
||||
$viewer = $this->getUser();
|
||||
|
||||
$show_revisions = PhabricatorApplication::isClassInstalledForViewer(
|
||||
'PhabricatorDifferentialApplication',
|
||||
$viewer);
|
||||
|
||||
$handles = $viewer->loadHandles($this->getRequiredHandlePHIDs());
|
||||
|
||||
$graph = null;
|
||||
@@ -242,6 +247,10 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||
$view->setColumnVisibility(
|
||||
array(
|
||||
$graph ? true : false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
$show_revisions,
|
||||
));
|
||||
$view->setDeviceVisibility(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user