mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Allow Home and Dashboards to be uninstalled
Summary: Ref T7143. This is the simplest fix for adding a new route for Home, at the cost of possibly letting users break instances. However: - It's kind of hard to get to the option to uninstall Home anyway. - It's hard to imagine anyone will really uninstall Home by accident, right? Right? - Put a really scary warning on the action just in case. Dashboards was only required because Home was required, I think, so just drop that too. Test Plan: Uninstalled home. Reviewers: btrahan Reviewed By: btrahan Subscribers: chad, epriestley Maniphest Tasks: T7143 Differential Revision: https://secure.phabricator.com/D11753
This commit is contained in:
parent
36494d4e2e
commit
30b201bade
3 changed files with 22 additions and 12 deletions
|
@ -55,8 +55,4 @@ final class PhabricatorDashboardApplication extends PhabricatorApplication {
|
|||
);
|
||||
}
|
||||
|
||||
public function canUninstall() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,10 +34,6 @@ final class PhabricatorHomeApplication extends PhabricatorApplication {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function canUninstall() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getApplicationOrder() {
|
||||
return 9;
|
||||
}
|
||||
|
|
|
@ -63,10 +63,28 @@ final class PhabricatorApplicationUninstallController
|
|||
}
|
||||
} else {
|
||||
if ($selected->canUninstall()) {
|
||||
$dialog->setTitle('Confirmation')
|
||||
->appendChild(
|
||||
'Really Uninstall '.$selected->getName().' application?')
|
||||
->addSubmitButton('Uninstall');
|
||||
$dialog->setTitle(pht('Really Uninstall Application?'));
|
||||
|
||||
if ($selected instanceof PhabricatorHomeApplication) {
|
||||
$dialog
|
||||
->appendParagraph(
|
||||
pht(
|
||||
'Are you absolutely certain you want to uninstall the Home '.
|
||||
'application?'))
|
||||
->appendParagraph(
|
||||
pht(
|
||||
'This is very unusual and will leave you without any '.
|
||||
'content on the Phabricator home page. You should only '.
|
||||
'do this if you are certain you know what you are doing.'))
|
||||
->addSubmitButton(pht('Completely Break Phabricator'));
|
||||
} else {
|
||||
$dialog
|
||||
->appendParagraph(
|
||||
pht(
|
||||
'Really uninstall the %s application?',
|
||||
$selected->getName()))
|
||||
->addSubmitButton(pht('Uninstall'));
|
||||
}
|
||||
} else {
|
||||
$dialog->setTitle('Information')
|
||||
->appendChild(
|
||||
|
|
Loading…
Reference in a new issue