mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
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
This commit is contained in:
parent
cc95818384
commit
49beca445b
2 changed files with 4 additions and 2 deletions
|
@ -66,7 +66,9 @@ abstract class PhabricatorApplication {
|
|||
$uninstalled =
|
||||
PhabricatorEnv::getEnvConfig('phabricator.uninstalled-applications');
|
||||
|
||||
if (isset($uninstalled[get_class($this)])) {
|
||||
if (!$this->canUninstall()) {
|
||||
return true;
|
||||
} else if (isset($uninstalled[get_class($this)])) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
|
|
@ -17,7 +17,7 @@ final class PhabricatorApplicationUninstallController
|
|||
|
||||
$selected = PhabricatorApplication::getByClass($this->application);
|
||||
|
||||
if (!$selected) {
|
||||
if (!$selected || !$selected->canUninstall()) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue