mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00: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:
parent
be83d62375
commit
6d5c9e897d
1 changed files with 9 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue