Skip to content

Commit 49beca4

Browse files
Afaque Hussainepriestley
Afaque Hussain
authored and
epriestley
committed
Respected canUninstall() :P
Summary: Disabled uninstalling of applications which can't be uninstalled. Also, applications which cannot be uninstalled always show that they are installed even if users somehow manually edit the configuration. Test Plan: Manually edited the URI to uninstall applications which can't be unisntalled. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4741
1 parent cc95818 commit 49beca4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/applications/base/PhabricatorApplication.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ public function isInstalled() {
6666
$uninstalled =
6767
PhabricatorEnv::getEnvConfig('phabricator.uninstalled-applications');
6868

69-
if (isset($uninstalled[get_class($this)])) {
69+
if (!$this->canUninstall()) {
70+
return true;
71+
} else if (isset($uninstalled[get_class($this)])) {
7072
return false;
7173
} else {
7274
return true;

src/applications/meta/controller/PhabricatorApplicationUninstallController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function processRequest() {
1717

1818
$selected = PhabricatorApplication::getByClass($this->application);
1919

20-
if (!$selected) {
20+
if (!$selected || !$selected->canUninstall()) {
2121
return new Aphront404Response();
2222
}
2323

0 commit comments

Comments
 (0)