Hide irrelevant panels in Mercurial/Subversion, fix Subversion URIs

Summary:
Ref T10923.

  - Hide "Automation", "Staging" and "Branches" in repositories where they do nothing.
  - Fix SVN SSH URIs to read "svn+ssh://" and have proper paths.

Test Plan:
  - Verified irrelevant sections did not appear in Subversion in Manage UI.
  - Checked out a new hosted SVN repository.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T10923

Differential Revision: https://secure.phabricator.com/D15874
This commit is contained in:
epriestley
2016-05-09 16:40:09 -07:00
parent e2bbde9675
commit 0b5ab2330d
6 changed files with 35 additions and 2 deletions

View File

@@ -27,11 +27,16 @@ final class DiffusionRepositoryManagePanelsController
$panels = DiffusionRepositoryManagementPanel::getAllPanels();
foreach ($panels as $panel) {
foreach ($panels as $key => $panel) {
$panel
->setViewer($viewer)
->setRepository($repository)
->setController($this);
if (!$panel->shouldEnableForRepository($repository)) {
unset($panels[$key]);
continue;
}
}
$selected = $request->getURIData('panel');