diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-16 16:38:43 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-26 09:53:04 +0100 |
commit | 5a5bcccd0d612bbb23214777d33a6439b75ffb53 (patch) | |
tree | cd75ed606dffbd4a9fa473c54f3b81f51aa6bd35 /lib/private/app | |
parent | 6fc59f85b69af3ab6a8b979b7b6240cc4920efc7 (diff) | |
download | nextcloud-server-5a5bcccd0d612bbb23214777d33a6439b75ffb53.tar.gz nextcloud-server-5a5bcccd0d612bbb23214777d33a6439b75ffb53.zip |
Don't show apps which are always enabled in the app manager
Diffstat (limited to 'lib/private/app')
-rw-r--r-- | lib/private/app/appmanager.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/private/app/appmanager.php b/lib/private/app/appmanager.php index a121b8ab861..5a932b7dc3f 100644 --- a/lib/private/app/appmanager.php +++ b/lib/private/app/appmanager.php @@ -136,9 +136,6 @@ class AppManager implements IAppManager { * @return bool */ private function checkAppForUser($enabled, $user) { - if ($this->isAlwaysEnabled($enabled)) { - return true; - } if ($enabled === 'yes') { return true; } elseif (is_null($user)) { @@ -284,14 +281,17 @@ class AppManager implements IAppManager { return $incompatibleApps; } + /** + * @inheritdoc + */ public function isShipped($appId) { $this->loadShippedJson(); return in_array($appId, $this->shippedApps); } private function isAlwaysEnabled($appId) { - $this->loadShippedJson(); - return in_array($appId, $this->alwaysEnabled); + $alwaysEnabled = $this->getAlwaysEnabledApps(); + return in_array($appId, $alwaysEnabled); } private function loadShippedJson() { @@ -310,4 +310,11 @@ class AppManager implements IAppManager { } } + /** + * @inheritdoc + */ + public function getAlwaysEnabledApps() { + $this->loadShippedJson(); + return $this->alwaysEnabled; + } } |