diff options
-rw-r--r-- | lib/private/util.php | 2 | ||||
-rw-r--r-- | tests/lib/util.php | 16 |
2 files changed, 2 insertions, 16 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 8e3a0302513..e48cdd4d9fc 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -237,7 +237,7 @@ class OC_Util { $newValue = json_encode($excludedGroups); $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); } - $usersGroups = $groupManager->getUserGroups($user); + $usersGroups = $groupManager->getUserGroupIds($user); if (!empty($usersGroups)) { $remainingGroups = array_diff($usersGroups, $excludedGroups); // if the user is only in groups which are disabled for sharing then diff --git a/tests/lib/util.php b/tests/lib/util.php index cb575976f3f..a328b1923e9 100644 --- a/tests/lib/util.php +++ b/tests/lib/util.php @@ -306,24 +306,10 @@ class Test_Util extends \Test\TestCase { $groupManager ->expects($this->at(0)) - ->method('getUserGroups') + ->method('getUserGroupIds') ->with($user) ->will($this->returnValue($membership)); -// $uid = "user1"; -// \OC_User::setUserId($uid); -// -// \OC_User::createUser($uid, "passwd"); -// -// foreach ($groups as $group) { -// \OC_Group::createGroup($group); -// } -// -// foreach ($membership as $group) { -// \OC_Group::addToGroup($uid, $group); -// } -// - $result = \OC_Util::isSharingDisabledForUser($config, $groupManager, $user); $this->assertSame($expected, $result); |