mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-04 20:52:43 +01:00
51ed95c00b
Summary: Ref T10054. - Just let users delete non-builtin items. - Let users choose a default item explicitly. - Do a better job of cleaning up items which no longer exist or belong to uninstalled applications. (NOTE) This has one user-facing change: workboards are no longer the default on projects with workboards. I think this is probably OK since we're giving users a ton of new toys at the same time, but I'll write some docs at least. Test Plan: - Deleted custom items. - Disabled/enabled builtin items. - Made various things defaults. - Uninstalled Maniphest, saw Workboards tab disappear entirely. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10054 Differential Revision: https://secure.phabricator.com/D15089
36 lines
905 B
PHP
36 lines
905 B
PHP
<?php
|
|
|
|
final class PhabricatorProjectViewController
|
|
extends PhabricatorProjectController {
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$request = $this->getRequest();
|
|
$viewer = $request->getViewer();
|
|
|
|
$response = $this->loadProject();
|
|
if ($response) {
|
|
return $response;
|
|
}
|
|
$project = $this->getProject();
|
|
|
|
$engine = $this->getProfilePanelEngine();
|
|
$default = $engine->getDefaultPanel();
|
|
|
|
switch ($default->getBuiltinKey()) {
|
|
case PhabricatorProject::PANEL_WORKBOARD:
|
|
$controller_object = new PhabricatorProjectBoardViewController();
|
|
break;
|
|
case PhabricatorProject::PANEL_PROFILE:
|
|
default:
|
|
$controller_object = new PhabricatorProjectProfileController();
|
|
break;
|
|
}
|
|
|
|
return $this->delegateToController($controller_object);
|
|
}
|
|
|
|
}
|