|
|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|