1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

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:
epriestley 2015-09-29 07:09:12 -07:00
parent be83d62375
commit 6d5c9e897d

View file

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