Commit 11f123c7 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #20546 from owncloud/provision_api_fix

[provisioning api] Return empty list if group does not have subadmins
parents 8db9c49c 6dcaac7e
......@@ -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);
}
}
......@@ -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() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment