diff --git a/apps/files_encryption/appinfo/info.xml b/apps/files_encryption/appinfo/info.xml index 46f1375c987..9d495916d26 100644 --- a/apps/files_encryption/appinfo/info.xml +++ b/apps/files_encryption/appinfo/info.xml @@ -7,6 +7,7 @@ Sam Tuke, Bjoern Schiessle, Florin Peter 4 true + false diff --git a/core/templates/login.php b/core/templates/login.php index ee761f0aa52..06f64d41e39 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -32,9 +32,10 @@ t('Lost your password?')); ?> - + + diff --git a/lib/base.php b/lib/base.php index 7e237c35d27..42182c21fb0 100644 --- a/lib/base.php +++ b/lib/base.php @@ -770,6 +770,7 @@ class OC { || !isset($_COOKIE["oc_token"]) || !isset($_COOKIE["oc_username"]) || !$_COOKIE["oc_remember_login"] + || !OC_Util::rememberLoginAllowed() ) { return false; } diff --git a/lib/private/util.php b/lib/private/util.php index 6be56d07c9a..1fb867d3ac8 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -471,6 +471,7 @@ class OC_Util { } $parameters['alt_login'] = OC_App::getAlternativeLogIns(); + $parameters['rememberLoginAllowed'] = self::rememberLoginAllowed(); OC_Template::printGuestPage("", "login", $parameters); } @@ -512,6 +513,27 @@ class OC_Util { } } + /** + * Check if it is allowed to remember login. + * + * @note Every app can set 'rememberlogin' to 'false' to disable the remember login feature + * + * @return bool + */ + public static function rememberLoginAllowed() { + + $apps = OC_App::getEnabledApps(); + + foreach ($apps as $app) { + $appInfo = OC_App::getAppInfo($app); + if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') { + return false; + } + + } + return true; + } + /** * @brief Check if the user is a subadmin, redirects to home if not * @return array $groups where the current user is subadmin