From d363e2f0e3ff2e0d3dec9f976c0d7e016909f230 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 10 Apr 2018 23:29:09 +0200 Subject: [PATCH 1/2] The integrationtests expect a string Signed-off-by: Roeland Jago Douma --- apps/provisioning_api/lib/Controller/AUserData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index 6c4967a6c3..82ca98ced8 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -92,7 +92,7 @@ abstract class AUserData extends OCSController { // Should be at least Admin Or SubAdmin! if( $this->groupManager->isAdmin($currentLoggedInUser->getUID()) || $this->groupManager->getSubAdmin()->isUserAccessible($currentLoggedInUser, $targetUserObject)) { - $data['enabled'] = $this->config->getUserValue($targetUserObject->getUID(), 'core', 'enabled', 'true') === 'true'; + $data['enabled'] = $this->config->getUserValue($targetUserObject->getUID(), 'core', 'enabled', 'true'); } else { // Check they are looking up themselves if($currentLoggedInUser->getUID() !== $targetUserObject->getUID()) { From a8d4b0688e92bd8272919137744ed08218b3a575 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 11 Apr 2018 00:30:14 +0200 Subject: [PATCH 2/2] Fix tests Signed-off-by: Roeland Jago Douma --- .../tests/Controller/UsersControllerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 148879d6d9..6959f16f5c 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -732,7 +732,7 @@ class UsersControllerTest extends TestCase { ->expects($this->at(0)) ->method('getUserValue') ->with('UID', 'core', 'enabled', 'true') - ->will($this->returnValue('true')); + ->will($this->returnValue('true')); $this->config ->expects($this->at(1)) ->method('getUserValue') @@ -766,7 +766,7 @@ class UsersControllerTest extends TestCase { $expected = [ 'id' => 'UID', - 'enabled' => true, + 'enabled' => 'true', 'storageLocation' => '/var/www/newtcloud/data/UID', 'lastLogin' => 1521191471000, 'backend' => 'Database', @@ -881,7 +881,7 @@ class UsersControllerTest extends TestCase { $expected = [ 'id' => 'UID', - 'enabled' => true, + 'enabled' => 'true', 'storageLocation' => '/var/www/newtcloud/data/UID', 'lastLogin' => 1521191471000, 'backend' => 'Database',