summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-01-02 13:27:10 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-01-11 19:20:11 +0100
commit140555b78685189ff14872c69ed438c5391e77fe (patch)
tree12eb29060b319eab0655cbd7ea9c387d87691e62
parent6f84eb89fc5f46dc1fd064563a06a03b2d8e9577 (diff)
downloadnextcloud-server-140555b78685189ff14872c69ed438c5391e77fe.tar.gz
nextcloud-server-140555b78685189ff14872c69ed438c5391e77fe.zip
always allow remembered login
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--apps/encryption/appinfo/info.xml1
-rw-r--r--apps/files_external/appinfo/info.xml1
-rw-r--r--core/Controller/LoginController.php1
-rw-r--r--core/templates/login.php2
-rw-r--r--lib/private/legacy/util.php21
-rw-r--r--tests/Core/Controller/LoginControllerTest.php3
-rw-r--r--tests/data/app/expected-info.json1
-rw-r--r--tests/data/app/invalid-info.xml1
-rw-r--r--tests/data/app/valid-info.xml1
9 files changed, 0 insertions, 32 deletions
diff --git a/apps/encryption/appinfo/info.xml b/apps/encryption/appinfo/info.xml
index 1e63ca5c471..61dc5564060 100644
--- a/apps/encryption/appinfo/info.xml
+++ b/apps/encryption/appinfo/info.xml
@@ -18,7 +18,6 @@
<user>user-encryption</user>
<admin>admin-encryption</admin>
</documentation>
- <rememberlogin>false</rememberlogin>
<version>1.5.0</version>
<types>
<filesystem/>
diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml
index b2f73dce621..1237e17300a 100644
--- a/apps/files_external/appinfo/info.xml
+++ b/apps/files_external/appinfo/info.xml
@@ -12,7 +12,6 @@
<documentation>
<admin>admin-external-storage</admin>
</documentation>
- <rememberlogin>false</rememberlogin>
<version>1.2.0</version>
<types>
<filesystem/>
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 3c81ed5242a..b2a5c510d0c 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -159,7 +159,6 @@ class LoginController extends Controller {
}
$parameters['alt_login'] = OC_App::getAlternativeLogIns();
- $parameters['rememberLoginAllowed'] = OC_Util::rememberLoginAllowed();
$parameters['rememberLoginState'] = !empty($remember_login) ? $remember_login : 0;
if (!is_null($user) && $user !== '') {
diff --git a/core/templates/login.php b/core/templates/login.php
index c200dfe366b..221242c0dcb 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -68,7 +68,6 @@ script('core', [
<input type="submit" id="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Log in')); ?>" disabled="disabled" />
<div class="login-additional">
- <?php if ($_['rememberLoginAllowed'] === true) : ?>
<div class="remember-login-container">
<?php if ($_['rememberLoginState'] === 0) { ?>
<input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white">
@@ -77,7 +76,6 @@ script('core', [
<?php } ?>
<label for="remember_login"><?php p($l->t('Stay logged in')); ?></label>
</div>
- <?php endif; ?>
</div>
<input type="hidden" name="timezone_offset" id="timezone_offset"/>
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index d97ba37c4c0..5ef1130d361 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -1002,27 +1002,6 @@ 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;
- }
-
- /**
* Check if the user is a subadmin, redirects to home if not
*
* @return null|boolean $groups where the current user is subadmin
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php
index 600179a1dc5..a1a4452abf8 100644
--- a/tests/Core/Controller/LoginControllerTest.php
+++ b/tests/Core/Controller/LoginControllerTest.php
@@ -179,7 +179,6 @@ class LoginControllerTest extends TestCase {
'user_autofocus' => true,
'canResetPassword' => true,
'alt_login' => [],
- 'rememberLoginAllowed' => \OC_Util::rememberLoginAllowed(),
'rememberLoginState' => 0,
'resetPasswordLink' => null,
],
@@ -238,7 +237,6 @@ class LoginControllerTest extends TestCase {
'user_autofocus' => false,
'canResetPassword' => $expectedResult,
'alt_login' => [],
- 'rememberLoginAllowed' => \OC_Util::rememberLoginAllowed(),
'rememberLoginState' => 0,
'resetPasswordLink' => false,
],
@@ -277,7 +275,6 @@ class LoginControllerTest extends TestCase {
'user_autofocus' => false,
'canResetPassword' => false,
'alt_login' => [],
- 'rememberLoginAllowed' => \OC_Util::rememberLoginAllowed(),
'rememberLoginState' => 0,
'resetPasswordLink' => false,
],
diff --git a/tests/data/app/expected-info.json b/tests/data/app/expected-info.json
index 646f22bea85..0666b902f2c 100644
--- a/tests/data/app/expected-info.json
+++ b/tests/data/app/expected-info.json
@@ -13,7 +13,6 @@
"user": "user-encryption",
"admin": "admin-encryption"
},
- "rememberlogin": "false",
"types": ["filesystem"],
"ocsid": "166047",
"dependencies": {
diff --git a/tests/data/app/invalid-info.xml b/tests/data/app/invalid-info.xml
index 3947f5420c2..0ddb13b89c0 100644
--- a/tests/data/app/invalid-info.xml
+++ b/tests/data/app/invalid-info.xml
@@ -14,7 +14,6 @@
<user>user-encryption</user>
<admin>admin-encryption</admin>
</documentation>
- <rememberlogin>false</rememberlogin>
<types>
<filesystem/>
</types>
diff --git a/tests/data/app/valid-info.xml b/tests/data/app/valid-info.xml
index 4b22d55d7bc..4788d046c13 100644
--- a/tests/data/app/valid-info.xml
+++ b/tests/data/app/valid-info.xml
@@ -14,7 +14,6 @@
<user>user-encryption</user>
<admin>admin-encryption</admin>
</documentation>
- <rememberlogin>false</rememberlogin>
<types>
<filesystem/>
</types>