diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-18 09:13:13 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-18 09:13:13 +0100 |
commit | 11f123c7d86b6327e89e1ec158551d0b9e5e9741 (patch) | |
tree | b631c47616a5dd2ab7dba9428d517ce03df340f3 /apps | |
parent | 8db9c49cdad54ead062e9ee6662b013abf37ab33 (diff) | |
parent | 6dcaac7e2c68ed55c59e4aa40e9cca3a79712f84 (diff) | |
download | nextcloud-server-11f123c7d86b6327e89e1ec158551d0b9e5e9741.tar.gz nextcloud-server-11f123c7d86b6327e89e1ec158551d0b9e5e9741.zip |
Merge pull request #20546 from owncloud/provision_api_fix
[provisioning api] Return empty list if group does not have subadmins
Diffstat (limited to 'apps')
-rw-r--r-- | apps/provisioning_api/lib/groups.php | 8 | ||||
-rw-r--r-- | apps/provisioning_api/tests/groupstest.php | 5 |
2 files changed, 3 insertions, 10 deletions
diff --git a/apps/provisioning_api/lib/groups.php b/apps/provisioning_api/lib/groups.php index 7c35caca5fd..7a6e6150782 100644 --- a/apps/provisioning_api/lib/groups.php +++ b/apps/provisioning_api/lib/groups.php @@ -176,14 +176,8 @@ class Groups{ foreach ($subadmins as $user) { $uids[] = $user->getUID(); } - $subadmins = $uids; - // Go - if(!$subadmins) { - return new OC_OCS_Result(null, 102, 'Unknown error occured'); - } else { - return new OC_OCS_Result($subadmins); - } + return new OC_OCS_Result($uids); } } diff --git a/apps/provisioning_api/tests/groupstest.php b/apps/provisioning_api/tests/groupstest.php index 7d4beb6a368..d37f4412e20 100644 --- a/apps/provisioning_api/tests/groupstest.php +++ b/apps/provisioning_api/tests/groupstest.php @@ -308,9 +308,8 @@ class GroupsTest extends \Test\TestCase { ]); $this->assertInstanceOf('OC_OCS_Result', $result); - $this->assertFalse($result->succeeded()); - $this->assertEquals(102, $result->getStatusCode()); - $this->assertEquals('Unknown error occured', $result->getMeta()['message']); + $this->assertTrue($result->succeeded()); + $this->assertEquals([], $result->getData()); } public function testAddGroupEmptyGroup() { |