diff --git a/appinfo/app.php b/appinfo/app.php
index 585328d..a2193ab 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -28,7 +28,14 @@
$app = new \OCA\UserCAS\AppInfo\Application();
$c = $app->getContainer();
-if (\OCP\App::isEnabled($c->getAppName())) {
+$enable = TRUE;
+
+$script = $_SERVER['SCRIPT_FILENAME'];
+if (in_array(basename($script), array('console.php', 'cron.php', 'public.php', 'remote.php', 'status.php', 'version.php')) || strpos($script, "/ocs")) {
+ $enable = FALSE;
+}
+
+if (\OCP\App::isEnabled($c->getAppName()) && !\OC::$CLI && $enable) {
$appService = $c->query('AppService');
$userService = $c->query('UserService');
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 81ed17f..8a614b6 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -6,7 +6,7 @@
AGPL
Felix Rupp, Leonis Holding, Sixto Martin
UserCAS
- 1.4.7
+ 1.4.8
diff --git a/lib/Service/AppService.php b/lib/Service/AppService.php
index 819efca..9ada5d0 100644
--- a/lib/Service/AppService.php
+++ b/lib/Service/AppService.php
@@ -231,16 +231,13 @@ public function isEnforceAuthentication()
return FALSE;
}
- $script = basename($_SERVER['SCRIPT_FILENAME']);
- return !in_array(
- $script,
- array(
- 'cron.php',
- 'public.php',
- 'remote.php',
- 'status.php',
- )
- );
+
+ $script = $_SERVER['SCRIPT_FILENAME'];
+ if (in_array(basename($script), array('console.php', 'cron.php', 'public.php', 'remote.php', 'status.php', 'version.php')) || strpos($script, "/ocs")) {
+ return FALSE;
+ }
+
+ return TRUE;
}
/**