mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Remove standalone huge single page setting edit controller
Summary: Ref T4103. This isn't necessary or particularly useful anymore since panels have been converted. Test Plan: Visited URI, got a 404. Reviewers: chad Reviewed By: chad Maniphest Tasks: T4103 Differential Revision: https://secure.phabricator.com/D16024
This commit is contained in:
parent
45f347fe47
commit
9a076b71a3
3 changed files with 0 additions and 39 deletions
|
@ -3378,7 +3378,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSettingsApplicationsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsApplicationsPanelGroup.php',
|
'PhabricatorSettingsApplicationsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsApplicationsPanelGroup.php',
|
||||||
'PhabricatorSettingsAuthenticationPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsAuthenticationPanelGroup.php',
|
'PhabricatorSettingsAuthenticationPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsAuthenticationPanelGroup.php',
|
||||||
'PhabricatorSettingsDeveloperPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsDeveloperPanelGroup.php',
|
'PhabricatorSettingsDeveloperPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsDeveloperPanelGroup.php',
|
||||||
'PhabricatorSettingsEditController' => 'applications/settings/controller/PhabricatorSettingsEditController.php',
|
|
||||||
'PhabricatorSettingsEditEngine' => 'applications/settings/editor/PhabricatorSettingsEditEngine.php',
|
'PhabricatorSettingsEditEngine' => 'applications/settings/editor/PhabricatorSettingsEditEngine.php',
|
||||||
'PhabricatorSettingsEmailPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsEmailPanelGroup.php',
|
'PhabricatorSettingsEmailPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsEmailPanelGroup.php',
|
||||||
'PhabricatorSettingsLogsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsLogsPanelGroup.php',
|
'PhabricatorSettingsLogsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsLogsPanelGroup.php',
|
||||||
|
@ -8139,7 +8138,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSettingsApplicationsPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
'PhabricatorSettingsApplicationsPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
||||||
'PhabricatorSettingsAuthenticationPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
'PhabricatorSettingsAuthenticationPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
||||||
'PhabricatorSettingsDeveloperPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
'PhabricatorSettingsDeveloperPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
||||||
'PhabricatorSettingsEditController' => 'PhabricatorController',
|
|
||||||
'PhabricatorSettingsEditEngine' => 'PhabricatorEditEngine',
|
'PhabricatorSettingsEditEngine' => 'PhabricatorEditEngine',
|
||||||
'PhabricatorSettingsEmailPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
'PhabricatorSettingsEmailPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
||||||
'PhabricatorSettingsLogsPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
'PhabricatorSettingsLogsPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
||||||
|
|
|
@ -37,8 +37,6 @@ final class PhabricatorSettingsApplication extends PhabricatorApplication {
|
||||||
'adjust/' => 'PhabricatorSettingsAdjustController',
|
'adjust/' => 'PhabricatorSettingsAdjustController',
|
||||||
'timezone/(?P<offset>[^/]+)/'
|
'timezone/(?P<offset>[^/]+)/'
|
||||||
=> 'PhabricatorSettingsTimezoneController',
|
=> 'PhabricatorSettingsTimezoneController',
|
||||||
'(?P<type>user)/(?P<username>[^/]+)/(?:panel/(?P<key>[^/]+)/)?'
|
|
||||||
=> 'PhabricatorSettingsEditController',
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
final class PhabricatorSettingsEditController
|
|
||||||
extends PhabricatorController {
|
|
||||||
|
|
||||||
public function handleRequest(AphrontRequest $request) {
|
|
||||||
$viewer = $this->getViewer();
|
|
||||||
|
|
||||||
$engine = id(new PhabricatorSettingsEditEngine())
|
|
||||||
->setController($this);
|
|
||||||
|
|
||||||
switch ($request->getURIData('type')) {
|
|
||||||
case 'user':
|
|
||||||
$user = id(new PhabricatorPeopleQuery())
|
|
||||||
->setViewer($viewer)
|
|
||||||
->withUsernames(array($request->getURIData('username')))
|
|
||||||
->executeOne();
|
|
||||||
|
|
||||||
$preferences = $user->loadPreferences();
|
|
||||||
|
|
||||||
PhabricatorPolicyFilter::requireCapability(
|
|
||||||
$viewer,
|
|
||||||
$preferences,
|
|
||||||
PhabricatorPolicyCapability::CAN_EDIT);
|
|
||||||
|
|
||||||
$engine->setTargetObject($preferences);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return new Aphront404Response();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $engine->buildResponse();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue