]> source.dussan.org Git - nextcloud-server.git/commitdiff
check every enabled app if the remember login feature needs to be disabled
authorBjoern Schiessle <schiessle@owncloud.com>
Thu, 26 Sep 2013 17:34:28 +0000 (19:34 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Thu, 26 Sep 2013 17:34:28 +0000 (19:34 +0200)
lib/util.php

index e12f753d5ae05e54d584a9845bdd99f6b08f71de..e1bec4aece3358bc33bf7f5842400c16c69f62a3 100755 (executable)
@@ -511,13 +511,23 @@ class OC_Util {
 
        /**
         * Check if it is allowed to remember login.
-        * E.g. if encryption is enabled the user needs to log-in every time he visites
-        * ownCloud in order to decrypt the private key.
+        *
+        * @note Every app can set 'rememberlogin' to 'false' to disable the remember login feature
         *
         * @return bool
         */
        public static function rememberLoginAllowed() {
-               return !OC_App::isEnabled('files_encryption');
+
+               $apps = OC_App::getEnabledApps();
+
+               foreach ($apps as $app) {
+                       $appInfo = OC_App::getAppInfo($app);
+                       if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') {
+                               return false;
+                       }
+
+               }
+               return true;
        }
 
        /**